Skip to content

Commit

Permalink
fix: ChatActivity nkheaderbtn show pinned
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Nov 26, 2024
1 parent 0562204 commit e5dea26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -27191,7 +27191,7 @@ private void updatePinnedMessageView(boolean animated, int animateToNext) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
if ((threadMessageObject == null || isTopic) && (chatInfo == null && userInfo == null || pinned_msg_id == 0 || !pinnedMessageIds.isEmpty() && pinnedMessageIds.get(0) == preferences.getInt("pin_" + dialog_id, 0)) || isReport() || actionBar != null && (actionBar.isActionModeShowed() || actionBar.isSearchFieldVisible())) {
changed = hidePinnedMessageView(animated);
if (headerItem != null) headerItem.hideSubItem(nkheaderbtn_show_pinned);
if (headerItem != null) headerItem.showSubItem(nkheaderbtn_show_pinned);
} else if (pinned_msg_id == preferences.getInt("pin_" + dialog_id, 0)) {
changed = hidePinnedMessageView(animated);
if (headerItem != null) headerItem.showSubItem(nkheaderbtn_show_pinned);
Expand Down Expand Up @@ -42128,7 +42128,7 @@ private void nkbtn_onclick_actionbar(int id) {
selectAndShareMyKey(new Intent());
} else if (id == nkheaderbtn_show_pinned) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
preferences.edit().putInt("pin_" + dialog_id, 0).apply();
preferences.edit().remove("pin_" + dialog_id).apply();
updatePinnedMessageView(true);
} else if (id == nkheaderbtn_linked_chat) {
if (chatInfo == null) {
Expand Down

0 comments on commit e5dea26

Please sign in to comment.