Better difference between deleted and active accounts
For deleted users: * Status changed to "account inaccessible" * Ghost icon in dialogs list * Status "account inacessible" shown even in block list
This commit is contained in:
parent
2351d710b9
commit
ccc0054227
10 changed files with 23 additions and 4 deletions
BIN
Telegram/Resources/icons/dialogs_deleted.png
Normal file
BIN
Telegram/Resources/icons/dialogs_deleted.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Telegram/Resources/icons/dialogs_deleted@2x.png
Normal file
BIN
Telegram/Resources/icons/dialogs_deleted@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Telegram/Resources/icons/dialogs_deleted@3x.png
Normal file
BIN
Telegram/Resources/icons/dialogs_deleted@3x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
|
|
@ -2315,4 +2315,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
"ktg_manage_peer_subscribers" = "Subscribers";
|
"ktg_manage_peer_subscribers" = "Subscribers";
|
||||||
|
|
||||||
|
"ktg_user_status_unaccessible" = "account inaccessible";
|
||||||
|
|
||||||
// Keys finished
|
// Keys finished
|
||||||
|
|
|
||||||
|
|
@ -78,5 +78,6 @@
|
||||||
"ktg_outdated_soon": "Иначе приложение перестанет обновляться с {date}.",
|
"ktg_outdated_soon": "Иначе приложение перестанет обновляться с {date}.",
|
||||||
"ktg_outdated_now": "Чтобы приложение Kotatogram могло получать обновления.",
|
"ktg_outdated_now": "Чтобы приложение Kotatogram могло получать обновления.",
|
||||||
"ktg_mac_menu_show": "Показать Kotatogram",
|
"ktg_mac_menu_show": "Показать Kotatogram",
|
||||||
"ktg_manage_peer_subscribers": "Подписчики"
|
"ktg_manage_peer_subscribers": "Подписчики",
|
||||||
|
"ktg_user_status_unaccessible": "аккаунт недоступен"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "storage/file_download.h"
|
#include "storage/file_download.h"
|
||||||
#include "data/data_peer_values.h"
|
#include "data/data_peer_values.h"
|
||||||
#include "data/data_chat.h"
|
#include "data/data_chat.h"
|
||||||
|
#include "data/data_user.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
#include "window/themes/window_theme.h"
|
#include "window/themes/window_theme.h"
|
||||||
|
|
@ -381,6 +382,8 @@ void PeerListRow::refreshStatus() {
|
||||||
if (auto user = peer()->asUser()) {
|
if (auto user = peer()->asUser()) {
|
||||||
if (_isSavedMessagesChat) {
|
if (_isSavedMessagesChat) {
|
||||||
setStatusText(tr::lng_saved_forward_here(tr::now));
|
setStatusText(tr::lng_saved_forward_here(tr::now));
|
||||||
|
} else if (user->isInaccessible()) {
|
||||||
|
setStatusText(tr::ktg_user_status_unaccessible(tr::now));
|
||||||
} else {
|
} else {
|
||||||
auto time = base::unixtime::now();
|
auto time = base::unixtime::now();
|
||||||
setStatusText(Data::OnlineText(user, time));
|
setStatusText(Data::OnlineText(user, time));
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,9 @@ int OnlinePhraseChangeInSeconds(TimeId online, TimeId now) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<QString> OnlineTextSpecial(not_null<UserData*> user) {
|
std::optional<QString> OnlineTextSpecial(not_null<UserData*> user) {
|
||||||
if (user->isNotificationsUser()) {
|
if (user->isInaccessible()) {
|
||||||
|
return tr::ktg_user_status_unaccessible(tr::now);
|
||||||
|
} else if (user->isNotificationsUser()) {
|
||||||
return tr::lng_status_service_notifications(tr::now);
|
return tr::lng_status_service_notifications(tr::now);
|
||||||
} else if (user->isSupport()) {
|
} else if (user->isSupport()) {
|
||||||
return tr::lng_status_support(tr::now);
|
return tr::lng_status_support(tr::now);
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,9 @@ dialogsChannelIconActive: icon {{ "dialogs_channel", dialogsChatIconFgActive, po
|
||||||
dialogsBotIcon: icon {{ "dialogs_bot", dialogsChatIconFg, point(1px, 3px) }};
|
dialogsBotIcon: icon {{ "dialogs_bot", dialogsChatIconFg, point(1px, 3px) }};
|
||||||
dialogsBotIconOver: icon {{ "dialogs_bot", dialogsChatIconFgOver, point(1px, 3px) }};
|
dialogsBotIconOver: icon {{ "dialogs_bot", dialogsChatIconFgOver, point(1px, 3px) }};
|
||||||
dialogsBotIconActive: icon {{ "dialogs_bot", dialogsChatIconFgActive, point(1px, 3px) }};
|
dialogsBotIconActive: icon {{ "dialogs_bot", dialogsChatIconFgActive, point(1px, 3px) }};
|
||||||
|
dialogsDeletedIcon: icon {{ "dialogs_deleted", dialogsChatIconFg, point(1px, 4px) }};
|
||||||
|
dialogsDeletedIconOver: icon {{ "dialogs_deleted", dialogsChatIconFgOver, point(1px, 4px) }};
|
||||||
|
dialogsDeletedIconActive: icon {{ "dialogs_deleted", dialogsChatIconFgActive, point(1px, 4px) }};
|
||||||
//dialogsFeedIcon: icon {{ "dialogs_feed", dialogsChatIconFg, point(4px, 4px) }}; // #feed
|
//dialogsFeedIcon: icon {{ "dialogs_feed", dialogsChatIconFg, point(4px, 4px) }}; // #feed
|
||||||
//dialogsFeedIconOver: icon {{ "dialogs_feed", dialogsChatIconFgOver, point(4px, 4px) }};
|
//dialogsFeedIconOver: icon {{ "dialogs_feed", dialogsChatIconFgOver, point(4px, 4px) }};
|
||||||
//dialogsFeedIconActive: icon {{ "dialogs_feed", dialogsChatIconFgActive, point(4px, 4px) }};
|
//dialogsFeedIconActive: icon {{ "dialogs_feed", dialogsChatIconFgActive, point(4px, 4px) }};
|
||||||
|
|
|
||||||
|
|
@ -516,7 +516,13 @@ const style::icon *ChatTypeIcon(
|
||||||
? st::dialogsChannelIconOver
|
? st::dialogsChannelIconOver
|
||||||
: st::dialogsChannelIcon));
|
: st::dialogsChannelIcon));
|
||||||
} else if (const auto user = peer->asUser()) {
|
} 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
|
return &(active
|
||||||
? st::dialogsBotIconActive
|
? st::dialogsBotIconActive
|
||||||
: (selected
|
: (selected
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,9 @@ std::unique_ptr<PeerListRow> BlockedBoxController::createRow(
|
||||||
auto row = std::make_unique<PeerListRowWithLink>(user);
|
auto row = std::make_unique<PeerListRowWithLink>(user);
|
||||||
row->setActionLink(tr::lng_blocked_list_unblock(tr::now));
|
row->setActionLink(tr::lng_blocked_list_unblock(tr::now));
|
||||||
const auto status = [&] {
|
const auto status = [&] {
|
||||||
if (!user->phone().isEmpty()) {
|
if (user->isInaccessible()) {
|
||||||
|
return tr::ktg_user_status_unaccessible(tr::now);
|
||||||
|
} else if (!user->phone().isEmpty()) {
|
||||||
return App::formatPhone(user->phone());
|
return App::formatPhone(user->phone());
|
||||||
} else if (!user->username.isEmpty()) {
|
} else if (!user->username.isEmpty()) {
|
||||||
return '@' + user->username;
|
return '@' + user->username;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue