mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
fix: Properly close player on user switch
This commit is contained in:
parent
fc8a0e153b
commit
e4c61aa43d
3 changed files with 9 additions and 5 deletions
|
|
@ -12,6 +12,7 @@ import 'package:fladder/providers/api_provider.dart';
|
|||
import 'package:fladder/providers/service_provider.dart';
|
||||
import 'package:fladder/providers/shared_provider.dart';
|
||||
import 'package:fladder/providers/sync_provider.dart';
|
||||
import 'package:fladder/providers/video_player_provider.dart';
|
||||
|
||||
part 'user_provider.g.dart';
|
||||
|
||||
|
|
@ -171,6 +172,7 @@ class User extends _$User {
|
|||
}
|
||||
|
||||
Future<void> logoutUser() async {
|
||||
await ref.read(videoPlayerProvider).stop();
|
||||
if (state == null) return;
|
||||
userState = null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue