autoselect All if user's not logged in
This commit is contained in:
parent
929d9ebbcb
commit
b338a667f3
|
@ -22,10 +22,12 @@ import 'inbox.dart';
|
|||
class HomeTab extends HookWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final selectedList =
|
||||
useState(_SelectedList(listingType: PostListingType.subscribed));
|
||||
// TODO: needs to be an observer? for accounts changes
|
||||
final accStore = useAccountsStore();
|
||||
final selectedList = useState(_SelectedList(
|
||||
listingType: accStore.hasNoAccount
|
||||
? PostListingType.all
|
||||
: PostListingType.subscribed));
|
||||
// TODO: needs to be an observer? for accounts changes
|
||||
final isc = useInfiniteScrollController();
|
||||
final theme = Theme.of(context);
|
||||
final instancesIcons = useMemoFuture(() async {
|
||||
|
@ -153,6 +155,12 @@ class HomeTab extends HookWidget {
|
|||
return '$first$last';
|
||||
}();
|
||||
|
||||
if (accStore.instances.isEmpty) {
|
||||
return Scaffold(
|
||||
body: Text('there needs to be at least one instance'),
|
||||
);
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
// TODO: make appbar autohide when scrolling down
|
||||
appBar: AppBar(
|
||||
|
|
Loading…
Reference in New Issue