mirror of
https://github.com/antebudimir/tempus.git
synced 2026-04-15 16:27:26 +00:00
fix: reduced debounce, added toast
This commit is contained in:
parent
99c31f4318
commit
a2801f3168
3 changed files with 7 additions and 4 deletions
|
|
@ -120,6 +120,7 @@ public class AlbumBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||
|
||||
TextView playRadio = view.findViewById(R.id.play_radio_text_view);
|
||||
playRadio.setOnClickListener(v -> {
|
||||
Toast.makeText(requireContext(), R.string.bottom_sheet_generating_instant_mix, Toast.LENGTH_SHORT).show();
|
||||
new AlbumRepository().getInstantMix(album, 20, new MediaCallback() {
|
||||
@Override
|
||||
public void onError(Exception exception) {
|
||||
|
|
@ -153,8 +154,8 @@ public class AlbumBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error checking playback: " + e.getMessage());
|
||||
}
|
||||
view.postDelayed(() -> dismissBottomSheet(), 200);
|
||||
}, 1200);
|
||||
view.postDelayed(() -> dismissBottomSheet(), 300);
|
||||
}, 300);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
|
@ -90,7 +91,7 @@ public class ArtistBottomSheetDialog extends BottomSheetDialogFragment implement
|
|||
TextView playRadio = view.findViewById(R.id.play_radio_text_view);
|
||||
playRadio.setOnClickListener(v -> {
|
||||
Log.d(TAG, "Artist instant mix clicked");
|
||||
|
||||
Toast.makeText(requireContext(), R.string.bottom_sheet_generating_instant_mix, Toast.LENGTH_LONG).show();
|
||||
ArtistRepository artistRepository = new ArtistRepository();
|
||||
artistRepository.getInstantMix(artist, 20)
|
||||
.observe(getViewLifecycleOwner(), new androidx.lifecycle.Observer<List<Child>>() {
|
||||
|
|
@ -115,7 +116,7 @@ public class ArtistBottomSheetDialog extends BottomSheetDialogFragment implement
|
|||
} catch (Exception e) {
|
||||
// Ignore
|
||||
}
|
||||
view.postDelayed(() -> dismissBottomSheet(), 200);
|
||||
view.postDelayed(() -> dismissBottomSheet(), 300);
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue