mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
Lyrics page asking to add lyrics fix
This commit is contained in:
parent
6f6c00d76d
commit
2ec0172741
@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:spotify/spotify.dart';
|
import 'package:spotify/spotify.dart';
|
||||||
import 'package:spotube/helpers/artist-to-string.dart';
|
import 'package:spotube/helpers/artist-to-string.dart';
|
||||||
@ -50,6 +49,7 @@ class Lyrics extends HookConsumerWidget {
|
|||||||
if (lyrics.value["lyrics"] != null && playback.currentTrack == null) {
|
if (lyrics.value["lyrics"] != null && playback.currentTrack == null) {
|
||||||
lyrics.value = {};
|
lyrics.value = {};
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}, [
|
}, [
|
||||||
lyricsSnapshot.data,
|
lyricsSnapshot.data,
|
||||||
lyricsSnapshot.hasData,
|
lyricsSnapshot.hasData,
|
||||||
@ -60,25 +60,6 @@ class Lyrics extends HookConsumerWidget {
|
|||||||
final breakpoint = useBreakpoints();
|
final breakpoint = useBreakpoints();
|
||||||
|
|
||||||
if (lyrics.value["lyrics"] == null && playback.currentTrack != null) {
|
if (lyrics.value["lyrics"] == null && playback.currentTrack != null) {
|
||||||
if (!hasToken) {
|
|
||||||
return Expanded(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"Genius lyrics API access token isn't set",
|
|
||||||
style: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.headline4
|
|
||||||
?.copyWith(color: Colors.red[400]),
|
|
||||||
),
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: () {
|
|
||||||
GoRouter.of(context).push("/settings");
|
|
||||||
},
|
|
||||||
child: const Text("Add Access Token"))
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
return const Expanded(
|
return const Expanded(
|
||||||
child: Center(
|
child: Center(
|
||||||
child: CircularProgressIndicator.adaptive(),
|
child: CircularProgressIndicator.adaptive(),
|
||||||
|
Loading…
Reference in New Issue
Block a user