fix: code-review #2 — dedup MagicBytes, auth für check_corrupted, UI-Flag, merged player streams, jq-JSON
This commit is contained in:
@@ -27,6 +27,7 @@ class _CloudScreenState extends State<CloudScreen> {
|
||||
String _letzterSync = 'Nie';
|
||||
List<Map> _korrupteSongs = [];
|
||||
bool _ladtKorrupt = false;
|
||||
bool _hatGeprueft = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -94,12 +95,13 @@ class _CloudScreenState extends State<CloudScreen> {
|
||||
}
|
||||
|
||||
Future<void> _ladeKorrupteSongs() async {
|
||||
setState(() => _ladtKorrupt = true);
|
||||
setState(() { _ladtKorrupt = true; _hatGeprueft = false; });
|
||||
try {
|
||||
final corrupted = await widget.cloud.getCorrupted();
|
||||
if (mounted) setState(() => _korrupteSongs = corrupted);
|
||||
if (mounted) setState(() { _korrupteSongs = corrupted; _hatGeprueft = true; });
|
||||
} catch (e) {
|
||||
MeloLogger().fehler('cloud_corrupted_laden', e);
|
||||
if (mounted) setState(() => _hatGeprueft = true);
|
||||
} finally {
|
||||
if (mounted) setState(() => _ladtKorrupt = false);
|
||||
}
|
||||
@@ -598,7 +600,7 @@ class _CloudScreenState extends State<CloudScreen> {
|
||||
],
|
||||
),
|
||||
)),
|
||||
] else if (!_ladtKorrupt && _korrupteSongs.isEmpty)
|
||||
] else if (!_ladtKorrupt && _hatGeprueft && _korrupteSongs.isEmpty)
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
|
||||
Reference in New Issue
Block a user