فهرست منبع

Remove long press action trigger live photo preview via tap

Signed-off-by: alperozturk <alper_ozturk@proton.me>
alperozturk 1 سال پیش
والد
کامیت
cb9dd8ee0a

+ 2 - 13
app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java

@@ -208,24 +208,13 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
         String livePhoto = getFile().getLivePhoto();
 
         if (livePhoto != null) {
-            binding.livePhotoIndicator.setVisibility(View.VISIBLE);
-            addTooltipToLivePhotoIndicator();
-
             OCFile videoOfLivePhoto = getFile().videoOfLivePhoto;
 
-            // For replay functionality setOnLongClickListener
-            binding.image.setOnLongClickListener(v -> {
-                playLivePhoto(videoOfLivePhoto);
-                return true;
-            });
+            binding.livePhotoIndicator.setVisibility(View.VISIBLE);
+            binding.livePhotoIndicator.setOnClickListener(v -> playLivePhoto(videoOfLivePhoto));
         }
     }
 
-    private void addTooltipToLivePhotoIndicator() {
-        TooltipCompat.setTooltipText(binding.livePhotoIndicator, requireContext().getString(R.string.live_photo_indicator_tooltip));
-        binding.livePhotoIndicator.setOnClickListener(v -> binding.livePhotoIndicator.performLongClick());
-    }
-
     private void hideActionBar() {
         PreviewImageActivity activity = (PreviewImageActivity) requireActivity();
         activity.toggleActionBarVisibility(true);

+ 0 - 1
app/src/main/res/values/strings.xml

@@ -87,7 +87,6 @@
     <string name="uploader_upload_files_behaviour_upload_and_delete_from_source">Delete file from source folder</string>
     <string name="file_list_seconds_ago">seconds ago</string>
     <string name="file_list_live">LIVE</string>
-    <string name="live_photo_indicator_tooltip">Long-press the image to activate live photo playback</string>
     <string name="file_list_empty_headline">No files here</string>
     <string name="folder_list_empty_headline">No folders here</string>
     <string name="file_list_empty">Upload some content or sync with your devices.</string>