mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-05-05 15:41:02 +00:00
sync original tg
This commit is contained in:
commit
12b0faf979
164 changed files with 33976 additions and 18517 deletions
|
|
@ -232,6 +232,7 @@ import org.telegram.ui.Components.VideoPlayerSeekBar;
|
|||
import org.telegram.ui.Components.VideoSeekPreviewImage;
|
||||
import org.telegram.ui.Components.VideoTimelinePlayView;
|
||||
import org.telegram.ui.Components.ViewHelper;
|
||||
import org.telegram.ui.Components.spoilers.SpoilersTextView;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
|
|
@ -6138,7 +6139,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
}
|
||||
|
||||
private TextView createCaptionTextView(LinkMovementMethod linkMovementMethod) {
|
||||
TextView textView = new TextView(activityContext) {
|
||||
TextView textView = new SpoilersTextView(activityContext) {
|
||||
|
||||
private boolean handleClicks;
|
||||
|
||||
|
|
@ -9918,6 +9919,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
cameraItem.setVisibility(View.VISIBLE);
|
||||
cameraItem.setTag(1);
|
||||
}
|
||||
menuItem.setVisibility(View.GONE);
|
||||
imagesArrLocals.addAll(photos);
|
||||
Object obj = imagesArrLocals.get(index);
|
||||
boolean allowCaption;
|
||||
|
|
@ -10093,6 +10095,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
} else {
|
||||
menuItem.hideSubItem(gallery_menu_delete);
|
||||
}
|
||||
menuItem.checkHideMenuItem();
|
||||
boolean noforwards = MessagesController.getInstance(UserConfig.selectedAccount).isChatNoForwards(newMessageObject.getChatId());
|
||||
if (isEmbedVideo) {
|
||||
menuItem.showSubItem(gallery_menu_openin);
|
||||
|
|
@ -10119,9 +10122,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
} else {
|
||||
menuItem.hideSubItem(gallery_menu_masks2);
|
||||
}
|
||||
menuItem.checkHideMenuItem();
|
||||
} else {
|
||||
speedGap.setVisibility(View.GONE);
|
||||
menuItem.hideSubItem(gallery_menu_openin);
|
||||
menuItem.checkHideMenuItem();
|
||||
final boolean pipItemVisible = pipItem.getVisibility() == View.VISIBLE;
|
||||
final boolean shouldMasksItemBeVisible = newMessageObject.hasAttachedStickers() && !DialogObject.isEncryptedDialog(newMessageObject.getDialogId());
|
||||
if (pipItemVisible) {
|
||||
|
|
@ -10332,9 +10337,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
actionBar.setTitle(LocaleController.formatString("Of", R.string.Of, switchingToIndex + 1, imagesArrLocations.size()));
|
||||
}
|
||||
boolean noforwards = avatarsDialogId != 0 && MessagesController.getInstance(currentAccount).isChatNoForwards(-avatarsDialogId);
|
||||
if (noforwards)
|
||||
if (noforwards) {
|
||||
menuItem.hideSubItem(gallery_menu_save);
|
||||
else menuItem.showSubItem(gallery_menu_save);
|
||||
} else {
|
||||
menuItem.showSubItem(gallery_menu_save);
|
||||
}
|
||||
allowShare = !noforwards;
|
||||
shareButton.setVisibility(allowShare ? View.VISIBLE : View.GONE);
|
||||
|
||||
|
|
@ -10344,6 +10351,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
} else {
|
||||
menuItem.showSubItem(gallery_menu_share);
|
||||
}
|
||||
menuItem.checkHideMenuItem();
|
||||
groupedPhotosListView.fillList();
|
||||
} else if (!imagesArrLocals.isEmpty()) {
|
||||
if (index < 0 || index >= imagesArrLocals.size()) {
|
||||
|
|
@ -10555,7 +10563,10 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
if (isVideo) {
|
||||
if (!MessagesController.getInstance(UserConfig.selectedAccount).isChatNoForwards(-currentDialogId))
|
||||
menuItem.showSubItem(gallery_menu_openin);
|
||||
else menuItem.hideSubItem(gallery_menu_openin);
|
||||
else {
|
||||
menuItem.hideSubItem(gallery_menu_openin);
|
||||
}
|
||||
menuItem.checkHideMenuItem();
|
||||
|
||||
if (!pipAvailable) {
|
||||
pipItem.setEnabled(false);
|
||||
|
|
@ -10582,6 +10593,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
} else {
|
||||
menuItem.hideSubItem(gallery_menu_savegif);
|
||||
}
|
||||
menuItem.checkHideMenuItem();
|
||||
actionBar.setTitle(LocaleController.getString("AttachGif", R.string.AttachGif));
|
||||
} else {
|
||||
if (size == 1) {
|
||||
|
|
@ -10595,6 +10607,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
}
|
||||
menuItem.showSubItem(gallery_menu_save);
|
||||
menuItem.hideSubItem(gallery_menu_savegif);
|
||||
menuItem.checkHideMenuItem();
|
||||
}
|
||||
groupedPhotosListView.fillList();
|
||||
pageBlocksAdapter.updateSlideshowCell(pageBlock);
|
||||
|
|
@ -11154,7 +11167,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
Theme.createChatResources(null, true);
|
||||
CharSequence str;
|
||||
if (messageObject != null && !messageObject.messageOwner.entities.isEmpty()) {
|
||||
Spannable spannableString = SpannableString.valueOf(caption.toString());
|
||||
Spannable spannableString = SpannableString.valueOf(caption);
|
||||
messageObject.addEntitiesToText(spannableString, true, false);
|
||||
if (messageObject.isVideo()) {
|
||||
MessageObject.addUrlsByPattern(messageObject.isOutOwner(), spannableString, false, 3, messageObject.getDuration(), false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue