From 29621b739aa2d4b4cc30dc16ad838e06a1937894 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Tue, 20 Jun 2023 09:46:01 +0200 Subject: [PATCH 1/3] Switch to icon-m-video as placeholder --- qml/components/messageContent/MessageVideo.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qml/components/messageContent/MessageVideo.qml b/qml/components/messageContent/MessageVideo.qml index b7f0d54..8bec2ca 100644 --- a/qml/components/messageContent/MessageVideo.qml +++ b/qml/components/messageContent/MessageVideo.qml @@ -95,7 +95,7 @@ MessageContentBase { tdLibWrapper.downloadFile(previewFileId); } } else { - placeholderImage.source = "image://theme/icon-l-video?white"; + placeholderImage.source = "image://theme/icon-m-video?white"; placeholderImage.width = Theme.itemSizeLarge placeholderImage.height = Theme.itemSizeLarge } From 5394fde1365b6019214021772f59c3c09148374a Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Tue, 8 Aug 2023 22:50:04 +0200 Subject: [PATCH 2/3] Update chat list more reliably --- src/chatlistmodel.cpp | 18 +++++++++++++----- src/chatlistmodel.h | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/chatlistmodel.cpp b/src/chatlistmodel.cpp index ebb5799..0b5d46d 100644 --- a/src/chatlistmodel.cpp +++ b/src/chatlistmodel.cpp @@ -561,6 +561,15 @@ int ChatListModel::updateChatOrder(int chatIndex) return newIndex; } +void ChatListModel::enableRefreshTimer() +{ + // Start timestamp refresh timer if not yet active (usually when the first visible chat is discovered) + if (!relativeTimeRefreshTimer->isActive()) { + LOG("Enabling refresh timer"); + relativeTimeRefreshTimer->start(); + } +} + void ChatListModel::calculateUnreadState() { if (this->appSettings->onlineOnlyMode()) { @@ -599,6 +608,7 @@ void ChatListModel::addVisibleChat(ChatData *chat) this->tdLibWrapper->registerJoinChat(); emit chatJoined(chat->chatId, chat->chatData.value("title").toString()); } + enableRefreshTimer(); } void ChatListModel::updateChatVisibility(const TDLibWrapper::Group *group) @@ -687,6 +697,7 @@ void ChatListModel::setShowAllChats(bool showAll) void ChatListModel::handleChatDiscovered(const QString &, const QVariantMap &chatToBeAdded) { + LOG("New chat discovered"); ChatData *chat = new ChatData(tdLibWrapper, chatToBeAdded); const TDLibWrapper::Group *group = tdLibWrapper->getGroup(chat->groupId); @@ -705,12 +716,8 @@ void ChatListModel::handleChatDiscovered(const QString &, const QVariantMap &cha LOG("Hidden chat" << chat->chatId); hiddenChats.insert(chat->chatId, chat); } else { + LOG("Visible chat" << chat->chatId); addVisibleChat(chat); - - // Start timestamp refresh timer when the first visible chat is discovered - if (!relativeTimeRefreshTimer->isActive()) { - relativeTimeRefreshTimer->start(); - } } } @@ -1034,5 +1041,6 @@ void ChatListModel::handleRelativeTimeRefreshTimer() LOG("Refreshing timestamps"); QVector roles; roles.append(ChatListModel::RoleLastMessageDate); + roles.append(ChatListModel::RoleLastMessageStatus); emit dataChanged(index(0), index(chatList.size() - 1), roles); } diff --git a/src/chatlistmodel.h b/src/chatlistmodel.h index 77b67e5..9bcc837 100644 --- a/src/chatlistmodel.h +++ b/src/chatlistmodel.h @@ -108,6 +108,7 @@ private: void updateChatVisibility(const TDLibWrapper::Group *group); void updateSecretChatVisibility(const QVariantMap secretChatDetails); int updateChatOrder(int chatIndex); + void enableRefreshTimer(); private: TDLibWrapper *tdLibWrapper; From fe50ead4ee0f6692f70843eaa27fbab4ba57a669 Mon Sep 17 00:00:00 2001 From: Nikolay Sinyov Date: Sat, 14 Oct 2023 00:21:35 +0300 Subject: [PATCH 3/3] Merged --- translations/harbour-fernschreiber-de.ts | 7 ------- translations/harbour-fernschreiber-en.ts | 7 ------- translations/harbour-fernschreiber-es.ts | 7 ------- translations/harbour-fernschreiber-fi.ts | 7 ------- translations/harbour-fernschreiber-fr.ts | 7 ------- translations/harbour-fernschreiber-hu.ts | 7 ------- translations/harbour-fernschreiber-it.ts | 7 ------- translations/harbour-fernschreiber-pl.ts | 7 ------- translations/harbour-fernschreiber-ru.ts | 7 ------- translations/harbour-fernschreiber-sk.ts | 7 ------- translations/harbour-fernschreiber-sv.ts | 7 ------- translations/harbour-fernschreiber-zh_CN.ts | 7 ------- translations/harbour-fernschreiber.ts | 7 ------- 13 files changed, 91 deletions(-) diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts index 30489bc..2009446 100644 --- a/translations/harbour-fernschreiber-de.ts +++ b/translations/harbour-fernschreiber-de.ts @@ -495,13 +495,6 @@ Sie haben noch keine Chats. - - ContactSync - - Could not synchronize your contacts with Telegram. - Konnte Ihre Kontakte nicht mit Telegram synchronisieren. - - CoverPage diff --git a/translations/harbour-fernschreiber-en.ts b/translations/harbour-fernschreiber-en.ts index dc306a1..5d29139 100644 --- a/translations/harbour-fernschreiber-en.ts +++ b/translations/harbour-fernschreiber-en.ts @@ -495,13 +495,6 @@ You don't have any chats yet. - - ContactSync - - Could not synchronize your contacts with Telegram. - Could not synchronize your contacts with Telegram. - - CoverPage diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts index 48fd1f2..4c35f53 100644 --- a/translations/harbour-fernschreiber-es.ts +++ b/translations/harbour-fernschreiber-es.ts @@ -495,13 +495,6 @@ No hay todavía conversaciones. - - ContactSync - - Could not synchronize your contacts with Telegram. - No se puede sincronizar los contactos con Telegrama. - - CoverPage diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts index a8e76f7..ac089e9 100644 --- a/translations/harbour-fernschreiber-fi.ts +++ b/translations/harbour-fernschreiber-fi.ts @@ -495,13 +495,6 @@ Sinulla ei ole vielä keskusteluja. - - ContactSync - - Could not synchronize your contacts with Telegram. - Yhteystietojasi ei voitu synkronoida Telegramin kanssa. - - CoverPage diff --git a/translations/harbour-fernschreiber-fr.ts b/translations/harbour-fernschreiber-fr.ts index cb76a6b..6fc3cde 100644 --- a/translations/harbour-fernschreiber-fr.ts +++ b/translations/harbour-fernschreiber-fr.ts @@ -495,13 +495,6 @@ Vous n'avez aucune conversation. - - ContactSync - - Could not synchronize your contacts with Telegram. - Impossible de synchroniser vos contacts avec Telegram. - - CoverPage diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts index 49311be..9926c27 100644 --- a/translations/harbour-fernschreiber-hu.ts +++ b/translations/harbour-fernschreiber-hu.ts @@ -485,13 +485,6 @@ - - ContactSync - - Could not synchronize your contacts with Telegram. - - - CoverPage diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts index 15c21b2..c3bec32 100644 --- a/translations/harbour-fernschreiber-it.ts +++ b/translations/harbour-fernschreiber-it.ts @@ -495,13 +495,6 @@ Nessuna chat presente - - ContactSync - - Could not synchronize your contacts with Telegram. - Sincronizzazione contatti con Telegram non riuscita - - CoverPage diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts index ab36a1c..498951b 100644 --- a/translations/harbour-fernschreiber-pl.ts +++ b/translations/harbour-fernschreiber-pl.ts @@ -505,13 +505,6 @@ Nie masz jeszcze żadnych czatów. - - ContactSync - - Could not synchronize your contacts with Telegram. - Nie można zsynchonizaować kontaktów z Telegramem. - - CoverPage diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts index 31ec53d..9db0913 100644 --- a/translations/harbour-fernschreiber-ru.ts +++ b/translations/harbour-fernschreiber-ru.ts @@ -505,13 +505,6 @@ Тут пока ничего нет - - ContactSync - - Could not synchronize your contacts with Telegram. - Невозможно синхронизировать ваши контакты с Телеграм. - - CoverPage diff --git a/translations/harbour-fernschreiber-sk.ts b/translations/harbour-fernschreiber-sk.ts index ba07b3e..1f055cb 100644 --- a/translations/harbour-fernschreiber-sk.ts +++ b/translations/harbour-fernschreiber-sk.ts @@ -505,13 +505,6 @@ Nemáte žiadne čety. - - ContactSync - - Could not synchronize your contacts with Telegram. - Nemožno synchonizovať kontakty s Telegramom. - - CoverPage diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts index cca0617..8288034 100644 --- a/translations/harbour-fernschreiber-sv.ts +++ b/translations/harbour-fernschreiber-sv.ts @@ -495,13 +495,6 @@ Du har inga chattar än. - - ContactSync - - Could not synchronize your contacts with Telegram. - Kunde inte synkronisera dina kontakter med Telegram. - - CoverPage diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts index 20b60e9..6a83637 100644 --- a/translations/harbour-fernschreiber-zh_CN.ts +++ b/translations/harbour-fernschreiber-zh_CN.ts @@ -485,13 +485,6 @@ 你还没有任何对话。 - - ContactSync - - Could not synchronize your contacts with Telegram. - 无法同步你的云端 Telegram 联系人。 - - CoverPage diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts index 9cb3f0b..7a65c7a 100644 --- a/translations/harbour-fernschreiber.ts +++ b/translations/harbour-fernschreiber.ts @@ -495,13 +495,6 @@ You don't have any chats yet. - - ContactSync - - Could not synchronize your contacts with Telegram. - - - CoverPage