mirror of https://github.com/NekoX-Dev/NekoX.git
PhotoViewer: show DC
This commit is contained in:
parent
c2bc81ac5a
commit
cf5115cafa
|
@ -10252,6 +10252,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
date = (long) newMessageObject.messageOwner.date * 1000;
|
||||
}
|
||||
String dateString = LocaleController.formatString("formatDateAtTime", R.string.formatDateAtTime, LocaleController.getInstance().formatterYear.format(new Date(date)), LocaleController.getInstance().formatterDay.format(new Date(date)));
|
||||
if (newMessageObject.messageOwner.media.document != null) {
|
||||
dateString = String.format(Locale.US, "%s @DC%d", dateString, newMessageObject.messageOwner.media.document.dc_id);
|
||||
} else if (newMessageObject.messageOwner.media.photo != null) {
|
||||
dateString = String.format(Locale.US, "%s @DC%d", dateString, newMessageObject.messageOwner.media.photo.dc_id);
|
||||
}
|
||||
if (newFileName != null && isVideo) {
|
||||
dateTextView.setText(String.format("%s (%s)", dateString, AndroidUtilities.formatFileSize(newMessageObject.getDocument().size)), animated);
|
||||
} else {
|
||||
|
@ -10395,6 +10400,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
long date = (long) avatarsArr.get(switchingToIndex).date * 1000;
|
||||
if (date != 0) {
|
||||
String dateString = LocaleController.formatString("formatDateAtTime", R.string.formatDateAtTime, LocaleController.getInstance().formatterYear.format(new Date(date)), LocaleController.getInstance().formatterDay.format(new Date(date)));
|
||||
dateString = String.format(Locale.US, "%s @DC%d", dateString, avatarsArr.get(switchingToIndex).dc_id);
|
||||
dateTextView.setText(dateString);
|
||||
}
|
||||
if (canEditAvatar && !avatarsArr.isEmpty()) {
|
||||
|
|
Loading…
Reference in New Issue