From 3233fe673d304761c62114bc510fb5c5e66b9b00 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 17 Nov 2020 18:30:56 +0100 Subject: [PATCH] Some fixes --- .../app/fedilab/fedilabtube/PeertubeActivity.java | 12 ++++++++++++ .../app/fedilab/fedilabtube/drawer/MenuAdapter.java | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java b/app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java index 8e5cf5c..3fb88ab 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/PeertubeActivity.java @@ -537,6 +537,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd binding.doubleTapPlayerView.setPlayer(player); binding.loader.setVisibility(View.GONE); player.setPlayWhenReady(autoPlay); + if (autoPlay) { + binding.doubleTapPlayerView.hideController(); + } captions = null; } currentResolution = null; @@ -819,6 +822,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd autoPlay, position, null, null); player.prepare(); player.setPlayWhenReady(autoPlay); + if (autoPlay) { + binding.doubleTapPlayerView.hideController(); + } } @@ -951,6 +957,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd player.seekTo(0, position); } player.setPlayWhenReady(autoPlay); + if (autoPlay) { + binding.doubleTapPlayerView.hideController(); + } } @Override @@ -1010,6 +1019,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd onStopCalled = false; if (player != null && !player.isPlaying()) { player.setPlayWhenReady(autoPlay); + if (autoPlay) { + binding.doubleTapPlayerView.hideController(); + } } } diff --git a/app/src/main/java/app/fedilab/fedilabtube/drawer/MenuAdapter.java b/app/src/main/java/app/fedilab/fedilabtube/drawer/MenuAdapter.java index 13d8d78..b4b59e0 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/drawer/MenuAdapter.java +++ b/app/src/main/java/app/fedilab/fedilabtube/drawer/MenuAdapter.java @@ -70,7 +70,7 @@ public class MenuAdapter extends RecyclerView.Adapter { final MenuItemVideo menuItemVideo = menuItemVideos.get(i); - Glide.with(context).load(menuItemVideo.getIcon()).into(holder.binding.menuIcon); + holder.binding.menuIcon.setImageResource(menuItemVideo.getIcon()); holder.binding.title.setText(menuItemVideo.getTitle()); holder.binding.itemMenuContainer.setOnClickListener(v -> { itemClicked.onItemClicked(menuItemVideo.getAction());