Skip to content

Commit

Permalink
fix: lyrics dynamic view timing
Browse files Browse the repository at this point in the history
(was reshowing late)
  • Loading branch information
MSOB7YY committed Jan 1, 2025
1 parent 8c5ad42 commit 18dd3c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/packages/lyrics_lrc_parsed_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class LyricsLRCParsedViewState extends State<LyricsLRCParsedView> {
final timeToWaitMS = _isCurrentLineEmpty ? 200 : 1200; // execute faster if current one empty (ie: cuz next most likely not empty)
bool butIsItWorth = true;
try {
final diff = lyrics[newIndex + 1].timestamp - lyrics[newIndex].timestamp;
final diff = lyrics[newIndex].timestamp - lyrics[newIndex - 1].timestamp; // (newIndex - 1) is the empty line
if (diff.abs() < const Duration(milliseconds: _lrcOpacityDurationMS * 2 + 200 + 1200)) butIsItWorth = false;
} catch (_) {}
if (butIsItWorth) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: namida
description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter
publish_to: "none"
version: 4.8.55-beta+241231174
version: 4.8.56-beta+250101108

environment:
sdk: ">=3.4.0 <4.0.0"
Expand Down

0 comments on commit 18dd3c7

Please sign in to comment.