Skip to content

Commit

Permalink
chore: minor fixed/tweaks
Browse files Browse the repository at this point in the history
+ isInYTCommentsSubpage check when popping in yt miniplayer
+ longer doubleTapSeekReset (900ms)
+ image delay bug introduced in a33dff0
+ unsorted yt history bug introduced in a33dff0
  • Loading branch information
MSOB7YY committed Dec 18, 2023
1 parent ba70591 commit 19f6b11
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/controller/navigator_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class NamidaNavigator {
}

final ytmpcpks = ytMiniplayerCommentsPageKey?.currentState;
if (ytmpcpks != null) {
if (isInYTCommentsSubpage && ytmpcpks != null) {
ytmpcpks.pop();
isInYTCommentsSubpage = false;
return;
Expand Down
6 changes: 2 additions & 4 deletions lib/ui/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,8 @@ class _MixesCardState extends State<_MixesCard> {
@override
void initState() {
super.initState();
Future.delayed(const Duration(milliseconds: 500)).then((value) {
_assignTrack();
_extractColor();
});
_assignTrack();
Future.delayed(const Duration(milliseconds: 500)).then((value) => _extractColor());
}

void onMixTap(Widget thumbnailWidget) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/widgets/video_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class NamidaVideoControlsState extends State<NamidaVideoControls> with TickerPro
final volumeHideDuration = const Duration(milliseconds: 500);
final brightnessHideDuration = const Duration(milliseconds: 500);
final transitionDuration = const Duration(milliseconds: 300);
final doubleTapSeekReset = const Duration(milliseconds: 600);
final doubleTapSeekReset = const Duration(milliseconds: 900);

Timer? _hideTimer;
void _resetTimer({bool hideControls = false}) {
Expand Down
2 changes: 1 addition & 1 deletion lib/youtube/controller/youtube_history_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class YoutubeHistoryController with HistoryManager<YoutubeID, String> {
}

static Future<SplayTreeMap<int, List<YoutubeID>>> _readHistoryFilesCompute(String path) async {
final map = SplayTreeMap<int, List<YoutubeID>>();
final map = SplayTreeMap<int, List<YoutubeID>>((date1, date2) => date2.compareTo(date1));
for (final f in Directory(path).listSyncSafe()) {
if (f is File) {
try {
Expand Down

0 comments on commit 19f6b11

Please sign in to comment.