update deps and last seen first seen
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
This commit is contained in:
parent
0fb985c4f9
commit
3647ff3d54
2
external/solanaceae_contact
vendored
2
external/solanaceae_contact
vendored
@ -1 +1 @@
|
||||
Subproject commit 2401079c1daaa4b8fdae378a8cad8d429c619565
|
||||
Subproject commit e2917c497c91f91f8febcd1f43e462fad8359305
|
2
external/solanaceae_message3
vendored
2
external/solanaceae_message3
vendored
@ -1 +1 @@
|
||||
Subproject commit 3e6c857c8ad509a94e5a309a5061c5729fbcc439
|
||||
Subproject commit e55fb46027f16a1bc078f797ae9fcc7609d15659
|
2
external/solanaceae_message_serializer
vendored
2
external/solanaceae_message_serializer
vendored
@ -1 +1 @@
|
||||
Subproject commit c5ee5ac3f9f0f9239d8b05be9c2d392f439dfa30
|
||||
Subproject commit b1becb2128224fe63b7dff2218ecc66e9b92bc5b
|
2
external/solanaceae_tox
vendored
2
external/solanaceae_tox
vendored
@ -1 +1 @@
|
||||
Subproject commit cd196562aff9b39e11a415bfb7a33f2066bf86c4
|
||||
Subproject commit 8ad10978b96837eb7949f32ef433c5b37c2aa458
|
2
external/solanaceae_util
vendored
2
external/solanaceae_util
vendored
@ -1 +1 @@
|
||||
Subproject commit 85bbbb0e5a572b61067f3db188f3cfbda0948e7e
|
||||
Subproject commit 6cbcc9463ce3c4344e06d74d7df67175ada83b5f
|
@ -11,11 +11,6 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
// fwd
|
||||
namespace Message {
|
||||
uint64_t getTimeMS(void);
|
||||
}
|
||||
|
||||
std::optional<TextureEntry> BitsetImageLoader::haveToTexture(TextureUploaderI& tu, BitSet& have, ObjectHandle o) {
|
||||
assert(have.size_bits() > 0);
|
||||
|
||||
@ -50,7 +45,7 @@ std::optional<TextureEntry> BitsetImageLoader::haveToTexture(TextureUploaderI& t
|
||||
SDL_LockSurface(conv_surf);
|
||||
|
||||
TextureEntry new_entry;
|
||||
new_entry.timestamp_last_rendered = Message::getTimeMS();
|
||||
new_entry.timestamp_last_rendered = getTimeMS();
|
||||
new_entry.width = have.size_bits();
|
||||
new_entry.height = 1;
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <solanaceae/contact/components.hpp>
|
||||
#include <solanaceae/util/utils.hpp>
|
||||
#include <solanaceae/util/time.hpp>
|
||||
|
||||
#include <imgui/imgui.h>
|
||||
//#include <imgui/imgui_internal.h>
|
||||
@ -12,6 +13,8 @@
|
||||
#include "./icons/person.hpp"
|
||||
#include "./icons/group.hpp"
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
void renderAvatar(
|
||||
const Theme& th,
|
||||
ContactTextureCache& contact_tc,
|
||||
@ -114,6 +117,22 @@ bool renderContactBig(
|
||||
ImGui::TextUnformatted("Connection state: unknown");
|
||||
}
|
||||
|
||||
// TODO: better time formatter
|
||||
const int64_t ts_now = getTimeMS();
|
||||
|
||||
if (const auto* cfirst = c.try_get<Contact::Components::FirstSeen>(); cfirst != nullptr) {
|
||||
ImGui::Text("First seen: %" PRId64 "s ago", (ts_now - int64_t(cfirst->ts))/1000);
|
||||
}
|
||||
|
||||
// TODO: fill with useful values periodically, maybe only show if not online?
|
||||
//if (const auto* clast = c.try_get<Contact::Components::LastSeen>(); clast != nullptr) {
|
||||
// ImGui::Text("Last seen: %" PRId64 "s ago", (ts_now - int64_t(clast->ts))/1000);
|
||||
//}
|
||||
|
||||
if (const auto* clasta = c.try_get<Contact::Components::LastActivity>(); clasta != nullptr) {
|
||||
ImGui::Text("Last Activity: %" PRId64 "s ago", (ts_now - int64_t(clasta->ts))/1000);
|
||||
}
|
||||
|
||||
if (
|
||||
const auto* slt = c.try_get<Contact::Components::StatusText>();
|
||||
slt != nullptr &&
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include "../image_loader_qoi.hpp"
|
||||
#include "../image_loader_sdl_image.hpp"
|
||||
|
||||
#include <solanaceae/util/time.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <solanaceae/file/file2_std.hpp>
|
||||
|
||||
@ -13,11 +15,6 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
// fwd
|
||||
namespace Message {
|
||||
uint64_t getTimeMS(void);
|
||||
}
|
||||
|
||||
SendImagePopup::SendImagePopup(TextureUploaderI& tu) : _tu(tu) {
|
||||
_image_loaders.push_back(std::make_unique<ImageLoaderSDLBMP>());
|
||||
_image_loaders.push_back(std::make_unique<ImageLoaderQOI>());
|
||||
@ -90,7 +87,7 @@ bool SendImagePopup::load(void) {
|
||||
}
|
||||
|
||||
assert(preview_image.textures.empty());
|
||||
preview_image.timestamp_last_rendered = Message::getTimeMS();
|
||||
preview_image.timestamp_last_rendered = getTimeMS();
|
||||
preview_image.current_texture = 0;
|
||||
for (const auto& [ms, data] : original_image.frames) {
|
||||
const auto n_t = _tu.upload(data.data(), original_image.width, original_image.height);
|
||||
@ -226,7 +223,7 @@ void SendImagePopup::render(float time_delta) {
|
||||
//const auto TEXT_BASE_WIDTH = ImGui::CalcTextSize("A").x;
|
||||
const auto TEXT_BASE_HEIGHT = ImGui::GetTextLineHeightWithSpacing();
|
||||
|
||||
preview_image.doAnimation(Message::getTimeMS());
|
||||
preview_image.doAnimation(getTimeMS());
|
||||
|
||||
time += time_delta;
|
||||
time = fmod(time, 1.f); // fract()
|
||||
|
@ -694,7 +694,7 @@ float ChatGui4::render(float time_delta) {
|
||||
|
||||
if (ImGui::BeginItemTooltip()) {
|
||||
std::string synced_by_text {"delivery confirmed by:"};
|
||||
const int64_t now_ts_s = int64_t(Message::getTimeMS() / 1000u);
|
||||
const int64_t now_ts_s = int64_t(getTimeMS() / 1000u);
|
||||
|
||||
size_t other_contacts {0};
|
||||
for (const auto& [c, syned_ts] : list) {
|
||||
@ -737,7 +737,7 @@ float ChatGui4::render(float time_delta) {
|
||||
|
||||
if (ImGui::BeginItemTooltip()) {
|
||||
std::string synced_by_text {"read confirmed by:"};
|
||||
const int64_t now_ts_s = int64_t(Message::getTimeMS() / 1000u);
|
||||
const int64_t now_ts_s = int64_t(getTimeMS() / 1000u);
|
||||
|
||||
for (const auto& [c, syned_ts] : list) {
|
||||
if (_cr.all_of<Contact::Components::TagSelfStrong>(c)) {
|
||||
@ -823,8 +823,8 @@ float ChatGui4::render(float time_delta) {
|
||||
cg_view.begin.emplace_or_replace<Message::Components::ViewCurserBegin>(cg_view.end);
|
||||
cg_view.end.emplace_or_replace<Message::Components::ViewCurserEnd>(cg_view.begin);
|
||||
|
||||
cg_view.begin.get_or_emplace<Message::Components::Timestamp>().ts = Message::getTimeMS();
|
||||
cg_view.end.get_or_emplace<Message::Components::Timestamp>().ts = Message::getTimeMS();
|
||||
cg_view.begin.get_or_emplace<Message::Components::Timestamp>().ts = getTimeMS();
|
||||
cg_view.end.get_or_emplace<Message::Components::Timestamp>().ts = getTimeMS();
|
||||
|
||||
std::cout << "CG: created view FRONT begin ts\n";
|
||||
_rmm.throwEventConstruct(cg_view.begin);
|
||||
@ -1546,7 +1546,7 @@ void ChatGui4::renderMessageExtra(Message3Registry& reg, const Message3 e) {
|
||||
|
||||
if (reg.all_of<Message::Components::SyncedBy>(e)) {
|
||||
std::string synced_by_text {"syncedBy:"};
|
||||
const int64_t now_ts_s = int64_t(Message::getTimeMS() / 1000u);
|
||||
const int64_t now_ts_s = int64_t(getTimeMS() / 1000u);
|
||||
|
||||
for (const auto& [c, syned_ts] : reg.get<Message::Components::SyncedBy>(e).ts) {
|
||||
if (_cr.all_of<Contact::Components::TagSelfStrong>(c)) {
|
||||
@ -1566,7 +1566,7 @@ void ChatGui4::renderMessageExtra(Message3Registry& reg, const Message3 e) {
|
||||
// TODO: remove?
|
||||
if (reg.all_of<Message::Components::ReceivedBy>(e)) {
|
||||
std::string synced_by_text {"receivedBy:"};
|
||||
const int64_t now_ts_s = int64_t(Message::getTimeMS() / 1000u);
|
||||
const int64_t now_ts_s = int64_t(getTimeMS() / 1000u);
|
||||
|
||||
for (const auto& [c, syned_ts] : reg.get<Message::Components::ReceivedBy>(e).ts) {
|
||||
if (_cr.all_of<Contact::Components::TagSelfStrong>(c)) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "./debug_video_tap.hpp"
|
||||
|
||||
#include <solanaceae/util/time.hpp>
|
||||
|
||||
#include <solanaceae/object_store/object_store.hpp>
|
||||
|
||||
#include <entt/entity/entity.hpp>
|
||||
@ -24,11 +26,6 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
// fwd
|
||||
namespace Message {
|
||||
uint64_t getTimeMS(void);
|
||||
}
|
||||
|
||||
struct DebugVideoTapSink : public FrameStream2SinkI<SDLVideoFrame> {
|
||||
TextureUploaderI& _tu;
|
||||
|
||||
@ -102,12 +99,12 @@ struct DebugVideoTestSource : public FrameStream2SourceI<SDLVideoFrame> {
|
||||
auto* surf = SDL_CreateSurface(960, 720, SDL_PIXELFORMAT_RGBA32);
|
||||
|
||||
// color
|
||||
static auto start_time = Message::getTimeMS();
|
||||
const float time = (Message::getTimeMS() - start_time)/1000.f;
|
||||
static auto start_time = getTimeMS();
|
||||
const float time = (getTimeMS() - start_time)/1000.f;
|
||||
SDL_ClearSurface(surf, std::sin(time), std::cos(time), 0.5f, 1.f);
|
||||
|
||||
SDLVideoFrame frame{ // non-owning
|
||||
Message::getTimeMS()*1000,
|
||||
getTimeMS()*1000,
|
||||
surf,
|
||||
};
|
||||
|
||||
|
@ -18,11 +18,6 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
// fwd
|
||||
namespace Message {
|
||||
uint64_t getTimeMS(void);
|
||||
}
|
||||
|
||||
MessageImageLoader::MessageImageLoader(void) {
|
||||
_image_loaders.push_back(std::make_unique<ImageLoaderSDLBMP>());
|
||||
_image_loaders.push_back(std::make_unique<ImageLoaderQOI>());
|
||||
@ -104,7 +99,7 @@ TextureLoaderResult MessageImageLoader::load(TextureUploaderI& tu, Message3Handl
|
||||
}
|
||||
|
||||
TextureEntry new_entry;
|
||||
new_entry.timestamp_last_rendered = Message::getTimeMS();
|
||||
new_entry.timestamp_last_rendered = getTimeMS();
|
||||
new_entry.current_texture = 0;
|
||||
for (const auto& [ms, data] : res.frames) {
|
||||
const auto n_t = tu.upload(data.data(), res.width, res.height);
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "./texture_cache.hpp"
|
||||
|
||||
#include <chrono>
|
||||
#include <array>
|
||||
#include <limits>
|
||||
|
||||
@ -24,7 +23,7 @@ int64_t TextureEntry::doAnimation(const int64_t ts_now) {
|
||||
|
||||
TextureEntry generateTestAnim(TextureUploaderI& tu) {
|
||||
TextureEntry new_entry;
|
||||
new_entry.timestamp_last_rendered = Message::getTimeMS();
|
||||
new_entry.timestamp_last_rendered = getTimeMS();
|
||||
new_entry.current_texture = 0;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
// hack
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <entt/container/dense_map.hpp>
|
||||
#include <entt/container/dense_set.hpp>
|
||||
|
||||
#include <solanaceae/util/time.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
@ -81,11 +83,6 @@ struct TextureLoaderResult {
|
||||
|
||||
TextureEntry generateTestAnim(TextureUploaderI& tu);
|
||||
|
||||
// fwd
|
||||
namespace Message {
|
||||
uint64_t getTimeMS(void);
|
||||
}
|
||||
|
||||
template<typename TextureType, typename KeyType, class Loader>
|
||||
struct TextureCache {
|
||||
static_assert(
|
||||
@ -157,7 +154,7 @@ struct TextureCache {
|
||||
}
|
||||
|
||||
float update(void) {
|
||||
const uint64_t ts_now = Message::getTimeMS();
|
||||
const uint64_t ts_now = getTimeMS();
|
||||
uint64_t ts_min_next = ts_now + ms_before_purge;
|
||||
|
||||
std::vector<KeyType> to_purge;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <solanaceae/object_store/object_store.hpp>
|
||||
#include <solanaceae/tox_contacts/components.hpp>
|
||||
#include <solanaceae/util/time.hpp>
|
||||
|
||||
#include "./frame_streams/stream_manager.hpp"
|
||||
#include "./frame_streams/audio_stream2.hpp"
|
||||
@ -16,11 +17,6 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
// fwd
|
||||
namespace Message {
|
||||
uint64_t getTimeMS(void);
|
||||
} // Message
|
||||
|
||||
namespace Components {
|
||||
struct ToxAVIncomingAV {
|
||||
bool incoming_audio {false};
|
||||
@ -771,7 +767,7 @@ bool ToxAVVoIPModel::onEvent(const Events::FriendVideoFrame& e) {
|
||||
// ms -> us
|
||||
// would be nice if we had been giving this from toxcore
|
||||
// TODO: make more precise
|
||||
Message::getTimeMS() * 1000,
|
||||
getTimeMS() * 1000,
|
||||
new_surf
|
||||
});
|
||||
|
||||
|
@ -16,11 +16,6 @@
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
|
||||
// fwd
|
||||
namespace Message {
|
||||
uint64_t getTimeMS(void);
|
||||
}
|
||||
|
||||
ToxAvatarLoader::ToxAvatarLoader(Contact3Registry& cr) : _cr(cr) {
|
||||
_image_loaders.push_back(std::make_unique<ImageLoaderSDLBMP>());
|
||||
_image_loaders.push_back(std::make_unique<ImageLoaderQOI>());
|
||||
@ -129,7 +124,7 @@ TextureLoaderResult ToxAvatarLoader::load(TextureUploaderI& tu, Contact3 c) {
|
||||
const auto& a_m = _cr.get<Contact::Components::AvatarMemory>(c);
|
||||
|
||||
TextureEntry new_entry;
|
||||
new_entry.timestamp_last_rendered = Message::getTimeMS();
|
||||
new_entry.timestamp_last_rendered = getTimeMS();
|
||||
new_entry.current_texture = 0;
|
||||
|
||||
new_entry.width = a_m.width;
|
||||
@ -167,7 +162,7 @@ TextureLoaderResult ToxAvatarLoader::load(TextureUploaderI& tu, Contact3 c) {
|
||||
}
|
||||
|
||||
TextureEntry new_entry;
|
||||
new_entry.timestamp_last_rendered = Message::getTimeMS();
|
||||
new_entry.timestamp_last_rendered = getTimeMS();
|
||||
new_entry.current_texture = 0;
|
||||
for (const auto& [ms, data] : res.frames) {
|
||||
const auto n_t = tu.upload(data.data(), res.width, res.height);
|
||||
@ -210,7 +205,7 @@ TextureLoaderResult ToxAvatarLoader::load(TextureUploaderI& tu, Contact3 c) {
|
||||
}
|
||||
|
||||
TextureEntry new_entry;
|
||||
new_entry.timestamp_last_rendered = Message::getTimeMS();
|
||||
new_entry.timestamp_last_rendered = getTimeMS();
|
||||
new_entry.current_texture = 0;
|
||||
|
||||
const auto n_t = tu.upload(pixels.data(), 5, 5, TextureUploaderI::RGBA, TextureUploaderI::NEAREST);
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "./tox_friend_faux_offline_messaging.hpp"
|
||||
|
||||
#include <solanaceae/util/time.hpp>
|
||||
|
||||
#include <solanaceae/toxcore/tox_interface.hpp>
|
||||
|
||||
#include <solanaceae/contact/components.hpp>
|
||||
@ -43,7 +45,7 @@ float ToxFriendFauxOfflineMessaging::tick(float time_delta) {
|
||||
_interval_timer = 60.f;
|
||||
|
||||
|
||||
const uint64_t ts_now = Message::getTimeMS();
|
||||
const uint64_t ts_now = getTimeMS();
|
||||
|
||||
// check ALL
|
||||
// for each online tox friend
|
||||
@ -105,7 +107,7 @@ ToxFriendFauxOfflineMessaging::dfmc_Ret ToxFriendFauxOfflineMessaging::doFriendM
|
||||
return dfmc_Ret::NO_MSG;
|
||||
}
|
||||
|
||||
const uint64_t ts_now = Message::getTimeMS();
|
||||
const uint64_t ts_now = getTimeMS();
|
||||
|
||||
if (!_cr.all_of<Contact::Components::Self>(c)) {
|
||||
return dfmc_Ret::NO_MSG; // error
|
||||
@ -220,7 +222,7 @@ bool ToxFriendFauxOfflineMessaging::onToxEvent(const Tox_Event_Friend_Connection
|
||||
return false;
|
||||
}
|
||||
|
||||
_cr.emplace_or_replace<Contact::Components::NextSendAttempt>(c, Message::getTimeMS() + uint64_t(_delay_after_cc*1000)); // wait before first message is sent
|
||||
_cr.emplace_or_replace<Contact::Components::NextSendAttempt>(c, getTimeMS() + uint64_t(_delay_after_cc*1000)); // wait before first message is sent
|
||||
|
||||
_interval_timer = 0.f;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user