diff --git a/lib/views/ai/ai.dart b/lib/views/ai/ai.dart index ffafe21..8aa9670 100644 --- a/lib/views/ai/ai.dart +++ b/lib/views/ai/ai.dart @@ -31,16 +31,8 @@ class _AiState extends State { @override void initState() { final state = context.read(); - Future.delayed( - Duration.zero, - () { - if (state.refresh) { - state.getBots(); - state.refresh = false; - } - state.getBots(); - }, - ); + + state.getBots(); super.initState(); } diff --git a/lib/views/ai/ai_chat_page.dart b/lib/views/ai/ai_chat_page.dart index 9c83094..5889126 100644 --- a/lib/views/ai/ai_chat_page.dart +++ b/lib/views/ai/ai_chat_page.dart @@ -552,7 +552,9 @@ class _AiChatPageState extends State { ), ), ), - if (message.file != null && !Platform.isIOS) + if (message.file != null && + !kIsWeb && + !Platform.isIOS) Padding( padding: const EdgeInsets.all(8.0), child: InkWell( diff --git a/lib/views/ai/widgets/hoshan_drawer.dart b/lib/views/ai/widgets/hoshan_drawer.dart index 8f0ea94..2f13fab 100644 --- a/lib/views/ai/widgets/hoshan_drawer.dart +++ b/lib/views/ai/widgets/hoshan_drawer.dart @@ -148,7 +148,7 @@ class _HoshanDrawerState extends State { slivers: [ SliverStateHandler( state: state, - centerEmptyState: true, + centerEmptyState: false, emptyState: const EmptyList(), // enableEmptyState: state.chats.isEmpty, placeholder: chatRowPlaceholder(), diff --git a/lib/views/home/home.dart b/lib/views/home/home.dart index e810a4c..22dc4e2 100644 --- a/lib/views/home/home.dart +++ b/lib/views/home/home.dart @@ -139,11 +139,11 @@ class _HomeState extends State state.tabController = _tabController; _tabController.addListener(() { state.currentPageIndex = _tabController.index; - if (_tabController.index == 2) { - homeScaffKey.currentState!.closeDrawer(); + // if (_tabController.index == 2) { + // homeScaffKey.currentState!.closeDrawer(); - context.read().getBots(); - } + // context.read().getBots(); + // } }); if (!kIsWeb) { Future.delayed(Duration.zero, () { diff --git a/lib/views/widgets/video/chat_video_player.dart b/lib/views/widgets/video/chat_video_player.dart index ae03e38..d9a9ddf 100644 --- a/lib/views/widgets/video/chat_video_player.dart +++ b/lib/views/widgets/video/chat_video_player.dart @@ -31,8 +31,8 @@ class _ChatVideoPlayerState extends State { } Future _handleVideoPlayback() async { - _videoPlayerController = VideoPlayerController.network(widget.src, - httpHeaders: {'Authorization': 'Bearer ${RequestService.token}'}); + _videoPlayerController = VideoPlayerController.network( + '${widget.src}?accessToken=${RequestService.token}'); await _videoPlayerController.initialize().then((_) { setState(() {