Merge branch 'main' of http://43.164.74.132:3000/hy/chatapp3-flutter
This commit is contained in:
commit
b076e43180
@ -42,6 +42,7 @@ import 'services/shop/shop_manager.dart';
|
||||
import 'services/theme/theme_manager.dart';
|
||||
import 'services/auth/user_profile_manager.dart';
|
||||
import 'ui_kit/theme/socialchat_theme.dart';
|
||||
import 'ui_kit/widgets/room/effect/vapp_svga_layer_widget.dart';
|
||||
|
||||
bool _isCrashlyticsReady = false;
|
||||
|
||||
@ -392,7 +393,19 @@ class _YumiApplicationState extends State<YumiApplication> {
|
||||
onGenerateRoute: SCLkApplication.router.generator,
|
||||
theme: themeManager.currentTheme,
|
||||
home: const SplashPage(),
|
||||
builder: FlutterSmartDialog.init(),
|
||||
builder: FlutterSmartDialog.init(
|
||||
builder: (context, child) {
|
||||
return Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
child ?? const SizedBox.shrink(),
|
||||
const Positioned.fill(
|
||||
child: VapPlusSvgaPlayer(tag: "room_gift"),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
navigatorObservers: [routeObserver],
|
||||
),
|
||||
),
|
||||
|
||||
@ -16,7 +16,6 @@ import 'package:yumi/services/audio/rtm_manager.dart';
|
||||
import 'package:yumi/ui_kit/widgets/room/anim/l_gift_animal_view.dart';
|
||||
import 'package:yumi/ui_kit/widgets/room/anim/room_entrance_screen.dart';
|
||||
import 'package:yumi/ui_kit/widgets/room/effect/luck_gift_nomor_anim_widget.dart';
|
||||
import 'package:yumi/ui_kit/widgets/room/effect/vapp_svga_layer_widget.dart';
|
||||
import 'package:yumi/ui_kit/widgets/room/room_head_widget.dart';
|
||||
import 'package:yumi/ui_kit/widgets/room/room_msg_item.dart';
|
||||
import 'package:yumi/ui_kit/widgets/room/room_online_user_widget.dart';
|
||||
@ -156,8 +155,6 @@ class _VoiceRoomPageState extends State<VoiceRoomPage>
|
||||
],
|
||||
),
|
||||
// _buildPlayViews(),
|
||||
VapPlusSvgaPlayer(tag: "room_gift"),
|
||||
|
||||
///幸运礼物中奖动画
|
||||
LuckGiftNomorAnimWidget(),
|
||||
],
|
||||
|
||||
@ -563,7 +563,7 @@ class RealTimeCommunicationManager extends ChangeNotifier {
|
||||
rtmProvider?.msgChatListener = null;
|
||||
rtmProvider?.msgGiftListener = null;
|
||||
SCLoadingManager.show(context: context);
|
||||
SCGiftVapSvgaManager().dispose();
|
||||
SCGiftVapSvgaManager().stopPlayback();
|
||||
SCHeartbeatUtils.scheduleHeartbeat(SCHeartbeatStatus.ONLINE.name, false);
|
||||
SCHeartbeatUtils.cancelAnchorTimer();
|
||||
rtmProvider?.cleanRoomData();
|
||||
@ -631,7 +631,7 @@ class RealTimeCommunicationManager extends ChangeNotifier {
|
||||
isMic = true;
|
||||
isMusicPlaying = false;
|
||||
DataPersistence.setLastTimeRoomId("");
|
||||
SCGiftVapSvgaManager().clearTasks();
|
||||
SCGiftVapSvgaManager().stopPlayback();
|
||||
SCRoomUtils.closeAllDialogs();
|
||||
SCGlobalConfig.isEntryVehicleAnimation = true;
|
||||
SCGlobalConfig.isGiftSpecialEffects = true;
|
||||
|
||||
@ -464,20 +464,28 @@ class SCGiftVapSvgaManager {
|
||||
_pn();
|
||||
}
|
||||
|
||||
// 释放资源
|
||||
void dispose() {
|
||||
_log('dispose queue=${_tq.length} currentPath=${_currentTask?.path}');
|
||||
_dis = true;
|
||||
void stopPlayback() {
|
||||
_log('stopPlayback queue=${_tq.length} currentPath=${_currentTask?.path}');
|
||||
_play = false;
|
||||
_currentTask = null;
|
||||
_pause = false;
|
||||
_tq.clear();
|
||||
_preloadQueue.clear();
|
||||
_queuedPreloadPaths.clear();
|
||||
_activePreloadCount = 0;
|
||||
_rgc?.stop();
|
||||
_rsc?.stop();
|
||||
_rsc?.reset();
|
||||
_rsc?.videoItem = null;
|
||||
}
|
||||
|
||||
// 释放资源
|
||||
void dispose() {
|
||||
_log('dispose queue=${_tq.length} currentPath=${_currentTask?.path}');
|
||||
_dis = true;
|
||||
stopPlayback();
|
||||
_rgc?.dispose();
|
||||
_rgc = null;
|
||||
_rsc?.stop();
|
||||
_rsc?.dispose();
|
||||
_rsc = null;
|
||||
}
|
||||
@ -487,13 +495,7 @@ class SCGiftVapSvgaManager {
|
||||
_log(
|
||||
'clearTasks queueBefore=${_tq.length} currentPath=${_currentTask?.path}',
|
||||
);
|
||||
_play = false;
|
||||
_currentTask = null;
|
||||
_tq.clear();
|
||||
_preloadQueue.clear();
|
||||
_queuedPreloadPaths.clear();
|
||||
_activePreloadCount = 0;
|
||||
_pause = false;
|
||||
stopPlayback();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user