[Improvement] Deleted account difference
This commit is contained in:
parent
ada1359688
commit
e4663eb1ad
10 changed files with 26 additions and 3 deletions
BIN
Telegram/Resources/icons/dialogs/dialogs_deleted.png
Normal file
BIN
Telegram/Resources/icons/dialogs/dialogs_deleted.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2 KiB |
BIN
Telegram/Resources/icons/dialogs/dialogs_deleted@2x.png
Normal file
BIN
Telegram/Resources/icons/dialogs/dialogs_deleted@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
Telegram/Resources/icons/dialogs/dialogs_deleted@3x.png
Normal file
BIN
Telegram/Resources/icons/dialogs/dialogs_deleted@3x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
|
|
@ -27,6 +27,7 @@
|
|||
"ktg_outdated_now": "So that Kotatogram Desktop can update to newer versions.",
|
||||
"ktg_mac_menu_show": "Show Kotatogram",
|
||||
"ktg_settings_kotato": "Kotatogram Settings",
|
||||
"ktg_user_status_unaccessible": "account inaccessible",
|
||||
"ktg_settings_chats": "Chats",
|
||||
"ktg_settings_sticker_height": "Sticker height: {pixels}px",
|
||||
"ktg_settings_sticker_scale_both": "Apply to sticker width",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "boxes/peer_list_box.h"
|
||||
|
||||
#include "kotato/kotato_lang.h"
|
||||
#include "main/session/session_show.h"
|
||||
#include "main/main_session.h"
|
||||
#include "mainwidget.h"
|
||||
|
|
@ -25,6 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "storage/file_download.h"
|
||||
#include "data/data_peer_values.h"
|
||||
#include "data/data_chat.h"
|
||||
#include "data/data_user.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_changes.h"
|
||||
#include "base/unixtime.h"
|
||||
|
|
@ -552,6 +554,8 @@ void PeerListRow::refreshStatus() {
|
|||
if (auto user = peer()->asUser()) {
|
||||
if (_isSavedMessagesChat) {
|
||||
setStatusText(tr::lng_saved_forward_here(tr::now));
|
||||
} else if (user->isInaccessible()) {
|
||||
setStatusText(ktr("ktg_user_status_unaccessible"));
|
||||
} else {
|
||||
auto time = base::unixtime::now();
|
||||
setStatusText(Data::OnlineText(user, time));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "data/data_peer_values.h"
|
||||
|
||||
#include "kotato/kotato_lang.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_chat.h"
|
||||
|
|
@ -52,7 +53,9 @@ int OnlinePhraseChangeInSeconds(TimeId online, TimeId now) {
|
|||
}
|
||||
|
||||
std::optional<QString> OnlineTextSpecial(not_null<UserData*> user) {
|
||||
if (user->isNotificationsUser()) {
|
||||
if (user->isInaccessible()) {
|
||||
return ktr("ktg_user_status_unaccessible");
|
||||
} else if (user->isNotificationsUser()) {
|
||||
return tr::lng_status_service_notifications(tr::now);
|
||||
} else if (user->isSupport()) {
|
||||
return tr::lng_status_support(tr::now);
|
||||
|
|
|
|||
|
|
@ -321,6 +321,9 @@ dialogsBotIconActive: icon {{ "dialogs/dialogs_bot", dialogsChatIconFgActive, po
|
|||
dialogsForumIcon: icon {{ "dialogs/dialogs_forum", dialogsChatIconFg, point(1px, 4px) }};
|
||||
dialogsForumIconOver: icon {{ "dialogs/dialogs_forum", dialogsChatIconFgOver, point(1px, 4px) }};
|
||||
dialogsForumIconActive: icon {{ "dialogs/dialogs_forum", dialogsChatIconFgActive, point(1px, 4px) }};
|
||||
dialogsDeletedIcon: icon {{ "dialogs/dialogs_deleted", dialogsChatIconFg, point(1px, 4px) }};
|
||||
dialogsDeletedIconOver: icon {{ "dialogs/dialogs_deleted", dialogsChatIconFgOver, point(1px, 4px) }};
|
||||
dialogsDeletedIconActive: icon {{ "dialogs/dialogs_deleted", dialogsChatIconFgActive, point(1px, 4px) }};
|
||||
dialogsArchiveUserpic: icon {{ "archive_userpic", historyPeerUserpicFg }};
|
||||
dialogsRepliesUserpic: icon {{ "replies_userpic", historyPeerUserpicFg }};
|
||||
dialogsInaccessibleUserpic: icon {{ "dialogs/inaccessible_userpic", historyPeerUserpicFg }};
|
||||
|
|
|
|||
|
|
@ -708,7 +708,13 @@ const style::icon *ChatTypeIcon(
|
|||
not_null<PeerData*> peer,
|
||||
const PaintContext &context) {
|
||||
if (const auto user = peer->asUser()) {
|
||||
if (ShowUserBotIcon(user)) {
|
||||
if (user->isInaccessible()) {
|
||||
return &(context.active
|
||||
? st::dialogsDeletedIconActive
|
||||
: (context.selected
|
||||
? st::dialogsDeletedIconOver
|
||||
: st::dialogsDeletedIcon));
|
||||
} else if (ShowUserBotIcon(user)) {
|
||||
return &(context.active
|
||||
? st::dialogsBotIconActive
|
||||
: context.selected
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "profile/profile_block_group_members.h"
|
||||
|
||||
#include "kotato/kotato_lang.h"
|
||||
#include "api/api_chat_participants.h"
|
||||
#include "styles/style_profile.h"
|
||||
#include "ui/widgets/labels.h"
|
||||
|
|
@ -176,7 +177,9 @@ void GroupMembersWidget::updateItemStatusText(Item *item) {
|
|||
auto member = getMember(item);
|
||||
auto user = member->user();
|
||||
if (member->statusText.isEmpty() || (member->onlineTextTill <= _now)) {
|
||||
if (user->isBot()) {
|
||||
if (user->isInaccessible()) {
|
||||
member->statusText = ktr("ktg_user_status_unaccessible");
|
||||
} else if (user->isBot()) {
|
||||
const auto seesAllMessages = user->botInfo->readsAllHistory
|
||||
|| member->rank.has_value();
|
||||
member->statusText = seesAllMessages
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "settings/settings_privacy_controllers.h"
|
||||
|
||||
#include "kotato/kotato_lang.h"
|
||||
#include "api/api_peer_photo.h"
|
||||
#include "apiwrap.h"
|
||||
#include "base/call_delayed.h"
|
||||
|
|
@ -447,6 +448,8 @@ std::unique_ptr<PeerListRow> BlockedBoxController::createRow(
|
|||
const auto user = peer->asUser();
|
||||
if (!user) {
|
||||
return tr::lng_group_status(tr::now);
|
||||
} else if (user->isInaccessible()) {
|
||||
return ktr("ktg_user_status_unaccessible");
|
||||
} else if (!user->phone().isEmpty()) {
|
||||
return Ui::FormatPhone(user->phone());
|
||||
} else if (!user->username().isEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue