Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
030 committed Nov 22, 2023
1 parent 0a6b87f commit 6f6dabc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7624,20 +7624,22 @@ private void checkPromoInfoInternal(boolean reset) {
}
objects.add(messageObject);
dialogMessage.put(did, objects);
if (promoDialog.last_message_date == 0) {
promoDialog.last_message_date = messageObject.messageOwner.date;
}
getTranslateController().checkDialogMessage(did);
}
sortDialogs(null);
getNotificationCenter().postNotificationName(NotificationCenter.dialogsNeedReload, true);
});
} else {
AndroidUtilities.runOnUIThread(() -> {
if (promoDialog != null) {
if (promoDialog.id < 0) {
TLRPC.Chat chat = getChat(-promoDialog.id);
if (ChatObject.isNotInChat(chat) || chat.restricted) {
if (promoDialog.last_message_date == 0) {
promoDialog.last_message_date = messageObject.messageOwner.date;
}
getTranslateController().checkDialogMessage(did);}
sortDialogs(null);
getNotificationCenter().postNotificationName(NotificationCenter.dialogsNeedReload, true);
});
} else {
AndroidUtilities.runOnUIThread(() -> {
if (promoDialog != null) {
if (promoDialog.id < 0) {
TLRPC.Chat chat = getChat(-promoDialog.id);
if (ChatObject.isNotInChat(chat) || chat.restricted) {
removeDialog(promoDialog);
}
} else {
removeDialog(promoDialog);
}
promoDialog = null;
Expand Down Expand Up @@ -17211,17 +17213,17 @@ private boolean canAddToForward(TLRPC.Dialog d) {
if (DialogObject.isEncryptedDialog(d.id)) {
return true;
}
boolean _canAddToForward = true;
boolean canAddToForward = true;
if (DialogObject.isChannel(d)) {
TLRPC.Chat chat = getChat(-d.id);
if (chat != null && chat.megagroup) {
_canAddToForward = !chat.gigagroup || ChatObject.hasAdminRights(chat);
canAddToForward = !chat.gigagroup || ChatObject.hasAdminRights(chat);
} else {
dialogsChannelsOnly.add(d);
_canAddToForward = ChatObject.hasAdminRights(chat) && ChatObject.canPost(chat);
canAddToForward = ChatObject.hasAdminRights(chat) && ChatObject.canPost(chat);
}
}
return _canAddToForward;
return canAddToForward;
}

public void sortDialogs(LongSparseArray<TLRPC.Chat> chatsDict) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ object PrivacyUtil {

runCatching {

(builder.show().getButton(DialogInterface.BUTTON_NEUTRAL) as TextView?)?.setTextColor(Theme.getColor(Theme.key_dialogTextRed))
(builder.show().getButton(DialogInterface.BUTTON_NEUTRAL) as TextView?)?.setTextColor(Theme.getColor(Theme.key_text_RedBold))

}

Expand Down Expand Up @@ -261,7 +261,7 @@ object PrivacyUtil {

runCatching {

(builder.show().getButton(DialogInterface.BUTTON_NEUTRAL) as TextView?)?.setTextColor(Theme.getColor(Theme.key_dialogTextRed))
(builder.show().getButton(DialogInterface.BUTTON_NEUTRAL) as TextView?)?.setTextColor(Theme.getColor(Theme.key_text_RedBold))

}

Expand Down

0 comments on commit 6f6dabc

Please sign in to comment.