mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-04 08:35:21 +00:00
[Improvement] Deleted account difference
This commit is contained in:
committed by
Eric Kotato
parent
674b37e85b
commit
6e42a0fd0e
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.0 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_outdated_now": "So that Kotatogram Desktop can update to newer versions.",
|
||||||
"ktg_mac_menu_show": "Show Kotatogram",
|
"ktg_mac_menu_show": "Show Kotatogram",
|
||||||
"ktg_settings_kotato": "Kotatogram Settings",
|
"ktg_settings_kotato": "Kotatogram Settings",
|
||||||
|
"ktg_user_status_unaccessible": "account inaccessible",
|
||||||
"ktg_settings_chats": "Chats",
|
"ktg_settings_chats": "Chats",
|
||||||
"ktg_settings_sticker_height": "Sticker height: {pixels}px",
|
"ktg_settings_sticker_height": "Sticker height: {pixels}px",
|
||||||
"ktg_settings_sticker_scale_both": "Apply to sticker width",
|
"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 "boxes/peer_list_box.h"
|
||||||
|
|
||||||
|
#include "kotato/kotato_lang.h"
|
||||||
#include "history/history.h" // chatListNameSortKey.
|
#include "history/history.h" // chatListNameSortKey.
|
||||||
#include "main/session/session_show.h"
|
#include "main/session/session_show.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
@@ -27,6 +28,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 "data/data_changes.h"
|
#include "data/data_changes.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
@@ -571,6 +573,8 @@ void PeerListRow::refreshStatus() {
|
|||||||
if (auto user = peer()->asUser()) {
|
if (auto user = peer()->asUser()) {
|
||||||
if (!_savedMessagesStatus.isEmpty()) {
|
if (!_savedMessagesStatus.isEmpty()) {
|
||||||
setStatusText(_savedMessagesStatus);
|
setStatusText(_savedMessagesStatus);
|
||||||
|
} else if (user->isInaccessible()) {
|
||||||
|
setStatusText(ktr("ktg_user_status_unaccessible"));
|
||||||
} else {
|
} else {
|
||||||
auto time = base::unixtime::now();
|
auto time = base::unixtime::now();
|
||||||
setStatusText(Data::OnlineText(user, time));
|
setStatusText(Data::OnlineText(user, time));
|
||||||
|
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
*/
|
*/
|
||||||
#include "data/data_peer_values.h"
|
#include "data/data_peer_values.h"
|
||||||
|
|
||||||
|
#include "kotato/kotato_lang.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "data/data_channel.h"
|
#include "data/data_channel.h"
|
||||||
#include "data/data_chat.h"
|
#include "data/data_chat.h"
|
||||||
@@ -49,7 +50,9 @@ int OnlinePhraseChangeInSeconds(LastseenStatus status, 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 ktr("ktg_user_status_unaccessible");
|
||||||
|
} 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);
|
||||||
|
@@ -344,6 +344,11 @@ dialogsForumIcon: ThreeStateIcon {
|
|||||||
over: icon {{ "dialogs/dialogs_forum", dialogsChatIconFgOver, point(1px, 4px) }};
|
over: icon {{ "dialogs/dialogs_forum", dialogsChatIconFgOver, point(1px, 4px) }};
|
||||||
active: icon {{ "dialogs/dialogs_forum", dialogsChatIconFgActive, point(1px, 4px) }};
|
active: icon {{ "dialogs/dialogs_forum", dialogsChatIconFgActive, point(1px, 4px) }};
|
||||||
}
|
}
|
||||||
|
dialogsDeletedIcon: ThreeStateIcon {
|
||||||
|
icon: icon {{ "dialogs/dialogs_deleted", dialogsChatIconFg, point(1px, 4px) }};
|
||||||
|
over: icon {{ "dialogs/dialogs_deleted", dialogsChatIconFgOver, point(1px, 4px) }};
|
||||||
|
active: icon {{ "dialogs/dialogs_deleted", dialogsChatIconFgActive, point(1px, 4px) }};
|
||||||
|
}
|
||||||
dialogsArchiveUserpic: icon {{ "archive_userpic", historyPeerUserpicFg }};
|
dialogsArchiveUserpic: icon {{ "archive_userpic", historyPeerUserpicFg }};
|
||||||
dialogsRepliesUserpic: icon {{ "replies_userpic", historyPeerUserpicFg }};
|
dialogsRepliesUserpic: icon {{ "replies_userpic", historyPeerUserpicFg }};
|
||||||
dialogsInaccessibleUserpic: icon {{ "dialogs/inaccessible_userpic", historyPeerUserpicFg }};
|
dialogsInaccessibleUserpic: icon {{ "dialogs/inaccessible_userpic", historyPeerUserpicFg }};
|
||||||
|
@@ -725,7 +725,12 @@ const style::icon *ChatTypeIcon(
|
|||||||
not_null<PeerData*> peer,
|
not_null<PeerData*> peer,
|
||||||
const PaintContext &context) {
|
const PaintContext &context) {
|
||||||
if (const auto user = peer->asUser()) {
|
if (const auto user = peer->asUser()) {
|
||||||
if (ShowUserBotIcon(user)) {
|
if (user->isInaccessible()) {
|
||||||
|
return &ThreeStateIcon(
|
||||||
|
st::dialogsDeletedIcon,
|
||||||
|
context.active,
|
||||||
|
context.selected);
|
||||||
|
} else if (ShowUserBotIcon(user)) {
|
||||||
return &ThreeStateIcon(
|
return &ThreeStateIcon(
|
||||||
st::dialogsBotIcon,
|
st::dialogsBotIcon,
|
||||||
context.active,
|
context.active,
|
||||||
|
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
*/
|
*/
|
||||||
#include "profile/profile_block_group_members.h"
|
#include "profile/profile_block_group_members.h"
|
||||||
|
|
||||||
|
#include "kotato/kotato_lang.h"
|
||||||
#include "api/api_chat_participants.h"
|
#include "api/api_chat_participants.h"
|
||||||
#include "styles/style_profile.h"
|
#include "styles/style_profile.h"
|
||||||
#include "ui/widgets/labels.h"
|
#include "ui/widgets/labels.h"
|
||||||
@@ -175,7 +176,9 @@ void GroupMembersWidget::updateItemStatusText(Item *item) {
|
|||||||
auto member = getMember(item);
|
auto member = getMember(item);
|
||||||
auto user = member->user();
|
auto user = member->user();
|
||||||
if (member->statusText.isEmpty() || (member->onlineTextTill <= _now)) {
|
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
|
const auto seesAllMessages = user->botInfo->readsAllHistory
|
||||||
|| member->rank.has_value();
|
|| member->rank.has_value();
|
||||||
member->statusText = seesAllMessages
|
member->statusText = seesAllMessages
|
||||||
|
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
*/
|
*/
|
||||||
#include "settings/settings_privacy_controllers.h"
|
#include "settings/settings_privacy_controllers.h"
|
||||||
|
|
||||||
|
#include "kotato/kotato_lang.h"
|
||||||
#include "api/api_global_privacy.h"
|
#include "api/api_global_privacy.h"
|
||||||
#include "api/api_peer_photo.h"
|
#include "api/api_peer_photo.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
@@ -457,6 +458,8 @@ std::unique_ptr<PeerListRow> BlockedBoxController::createRow(
|
|||||||
const auto user = peer->asUser();
|
const auto user = peer->asUser();
|
||||||
if (!user) {
|
if (!user) {
|
||||||
return tr::lng_group_status(tr::now);
|
return tr::lng_group_status(tr::now);
|
||||||
|
} else if (user->isInaccessible()) {
|
||||||
|
return ktr("ktg_user_status_unaccessible");
|
||||||
} else if (!user->phone().isEmpty()) {
|
} else if (!user->phone().isEmpty()) {
|
||||||
return Ui::FormatPhone(user->phone());
|
return Ui::FormatPhone(user->phone());
|
||||||
} else if (!user->username().isEmpty()) {
|
} else if (!user->username().isEmpty()) {
|
||||||
|
Reference in New Issue
Block a user