bug fixes

This commit is contained in:
MohammadTaha Basiri 2022-03-31 01:58:51 +04:30
parent c8d40adec3
commit 91d8469d19
4 changed files with 11 additions and 5 deletions

View File

@ -180,6 +180,7 @@ class _StudioPreview extends StatelessWidget {
}, },
child: Container( child: Container(
width: 88, width: 88,
height: 216,
color: Colors.transparent, color: Colors.transparent,
child: Column( child: Column(
children: [ children: [

View File

@ -27,7 +27,7 @@ class StudioState extends CoreProvier {
bool get searching => search.isNotEmpty; bool get searching => search.isNotEmpty;
set videosSelected(bool value) { set videosSelected(bool value) {
if (_videosSelected == value) return; if (_videosSelected == value || appState == AppState.busy) return;
_videosSelected = value; _videosSelected = value;
selectedSortTypeIndex = 0; selectedSortTypeIndex = 0;
_getSliders(); _getSliders();

View File

@ -277,9 +277,14 @@ class AudioPlayerWidget extends StatelessWidget {
), ),
onConfirmed: () { onConfirmed: () {
if (!state.stopOnPodcastEnds) { if (!state.stopOnPodcastEnds) {
state.timer = Timer( state.timer = Timer.periodic(
Duration(minutes: timerValue), const Duration(minutes: 1),
MediaService.audioPlayer.stop, (timer) {
timerValue--;
if (timerValue == 0) {
MediaService.audioPlayer.stop();
}
},
); );
} }
state.timerValue = timerValue; state.timerValue = timerValue;

View File

@ -94,7 +94,6 @@ class _SplashState extends State<Splash> {
.removeWhere((key, value) => key == 'image-cache'); .removeWhere((key, value) => key == 'image-cache');
}); });
} }
await AppInitializer.setupServices();
final settingsData = await AppInitializer.initilizeSettings(); final settingsData = await AppInitializer.initilizeSettings();
final themeProvider = context.read<ThemeProvider>(); final themeProvider = context.read<ThemeProvider>();
themeProvider.themeMode = settingsData.themeMode; themeProvider.themeMode = settingsData.themeMode;
@ -106,6 +105,7 @@ class _SplashState extends State<Splash> {
_isGettingThemeData = false; _isGettingThemeData = false;
}), }),
); );
await AppInitializer.setupServices();
final userProvider = context.read<UserProvider>(); final userProvider = context.read<UserProvider>();
final String? token = await userProvider.setAndGetToken(); final String? token = await userProvider.setAndGetToken();
if (token != null) { if (token != null) {