Skip to content

Commit

Permalink
fix: photo show dc_id
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Aug 12, 2023
1 parent cfc2554 commit 94b33fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -12442,6 +12442,13 @@ private void setIsAboutToSwitchToIndex(int index, boolean init, boolean animated
CharSequence subtitle = null;
if (newMessageObject.messageOwner != null) {
subtitle = LocaleController.formatDateAudio(newMessageObject.messageOwner.date, false);
if (newMessageObject.messageOwner.media != null) {
if (newMessageObject.messageOwner.media.document != null) {
subtitle = String.format(Locale.US, "%s, DC%d", subtitle, newMessageObject.messageOwner.media.document.dc_id);
} else if (newMessageObject.messageOwner.media.photo != null) {
subtitle = String.format(Locale.US, "%s, DC%d", subtitle, newMessageObject.messageOwner.media.photo.dc_id);
}
}
}
actionBarContainer.setSubtitle(subtitle, animated);

Expand Down

0 comments on commit 94b33fe

Please sign in to comment.