Skip to content

Commit

Permalink
feat: play gif as video
Browse files Browse the repository at this point in the history
Signed-off-by: Next Alone <[email protected]>
  • Loading branch information
NextAlone committed Feb 25, 2024
1 parent 16e692b commit f7bcbac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -11892,7 +11892,7 @@ private void onPhotoShow(final MessageObject messageObject, final TLRPC.FileLoca
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.dialogPhotosUpdate, dialogPhotos);
}
}
if (currentMessageObject != null && currentMessageObject.isVideo() || currentBotInlineResult != null && (currentBotInlineResult.type.equals("video") || MessageObject.isVideoDocument(currentBotInlineResult.document)) || (pageBlocksAdapter != null && (pageBlocksAdapter.isVideo(index) || pageBlocksAdapter.isHardwarePlayer(index))) || (sendPhotoType == SELECT_TYPE_NO_SELECT && ((MediaController.PhotoEntry)imagesArrLocals.get(index)).isVideo)) {
if (currentMessageObject != null && (currentMessageObject.isVideo() || currentMessageObject.isGif()) || currentBotInlineResult != null && (currentBotInlineResult.type.equals("video") || MessageObject.isVideoDocument(currentBotInlineResult.document)) || (pageBlocksAdapter != null && (pageBlocksAdapter.isVideo(index) || pageBlocksAdapter.isHardwarePlayer(index))) || (sendPhotoType == SELECT_TYPE_NO_SELECT && ((MediaController.PhotoEntry)imagesArrLocals.get(index)).isVideo)) {
playerAutoStarted = true;
onActionClick(false);
} else if (!imagesArrLocals.isEmpty()) {
Expand Down Expand Up @@ -11968,7 +11968,7 @@ private void setIsAboutToSwitchToIndex(int index, boolean init, boolean animated
}
newMessageObject = imagesArr.get(switchingToIndex);
newMessageObject.updateTranslation();
isVideo = newMessageObject.isVideo();
isVideo = newMessageObject.isVideo() || newMessageObject.isGif();

title = FilteredSearchView.createFromInfoString(newMessageObject, opennedFromMedia && !openedFromProfile, 0);
CharSequence subtitle = null;
Expand Down Expand Up @@ -15964,7 +15964,7 @@ private void cancelMoveZoomAnimation() {
zoomAnimation = false;
containerView.invalidate();
}

public void zoomOut() {
animateTo(1f, 0, 0, false);
}
Expand Down

0 comments on commit f7bcbac

Please sign in to comment.