[Improvement] Deleted account difference
This commit is contained in:
parent
a9054f9780
commit
5a87490e4e
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/main_session.h"
|
||||
#include "mainwidget.h"
|
||||
#include "ui/widgets/multi_select.h"
|
||||
|
|
@ -22,6 +23,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"
|
||||
|
|
@ -515,6 +517,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"
|
||||
|
|
@ -51,7 +52,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);
|
||||
|
|
|
|||
|
|
@ -214,6 +214,9 @@ dialogsChannelIconActive: icon {{ "dialogs/dialogs_channel", dialogsChatIconFgAc
|
|||
dialogsBotIcon: icon {{ "dialogs/dialogs_bot", dialogsChatIconFg, point(1px, 3px) }};
|
||||
dialogsBotIconOver: icon {{ "dialogs/dialogs_bot", dialogsChatIconFgOver, point(1px, 3px) }};
|
||||
dialogsBotIconActive: icon {{ "dialogs/dialogs_bot", dialogsChatIconFgActive, point(1px, 3px) }};
|
||||
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 }};
|
||||
|
||||
|
|
|
|||
|
|
@ -937,7 +937,13 @@ const style::icon *ChatTypeIcon(
|
|||
? st::dialogsChannelIconOver
|
||||
: st::dialogsChannelIcon));
|
||||
} else if (const auto user = peer->asUser()) {
|
||||
if (ShowUserBotIcon(user)) {
|
||||
if (user->isInaccessible()) {
|
||||
return &(active
|
||||
? st::dialogsDeletedIconActive
|
||||
: (selected
|
||||
? st::dialogsDeletedIconOver
|
||||
: st::dialogsDeletedIcon));
|
||||
} else if (ShowUserBotIcon(user)) {
|
||||
return &(active
|
||||
? st::dialogsBotIconActive
|
||||
: (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 "settings/settings_common.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "apiwrap.h"
|
||||
|
|
@ -437,6 +438,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