TF-3643 Thread Detail fix load more show initial loading view

This commit is contained in:
DatDang authored and Dat H. Pham committed 2025-05-26 09:29:45 +07:00
1 parent 6f74212ddc
commit 9393bedf2c
1 file changed
+6 -1
@@ -1,12 +1,17 @@
import 'package:core/presentation/views/loading/cupertino_loading_widget.dart';
import 'package:flutter/material.dart';
import 'package:tmail_ui_user/features/thread_detail/domain/state/get_thread_by_id_state.dart';
import 'package:tmail_ui_user/features/thread_detail/presentation/thread_detail_controller.dart';
extension GetThreadDetailLoadingView on ThreadDetailController {
Widget getThreadDetailLoadingView({
required bool isResponsiveDesktop,
}) {
if (!loadingThreadDetail) return const SizedBox.shrink();
final isLoading = viewState.value.fold(
(failure) => false,
(success) => success is GettingThreadById
);
if (!isLoading) return const SizedBox.shrink();
return Expanded(
child: Container(