chore: Improve stories

This commit is contained in:
Christian Pauly 2021-12-25 14:42:48 +01:00
commit 443e2e548f
3 changed files with 13 additions and 2 deletions

View file

@ -136,7 +136,10 @@ class StoryPageController extends State<StoryPage> {
Future<void>? loadStory;
Future<void> _loadStory() async {
final room = Matrix.of(context).client.getRoomById(roomId);
final client = Matrix.of(context).client;
await client.roomsLoading;
await client.accountDataLoading;
final room = client.getRoomById(roomId);
if (room == null) return;
if (room.membership != Membership.join) {
final joinedFuture = room.client.onSync.stream

View file

@ -23,6 +23,7 @@ class StoryView extends StatelessWidget {
Widget build(BuildContext context) {
final currentEvent = controller.currentEvent;
return Scaffold(
backgroundColor: Colors.blueGrey,
appBar: AppBar(
titleSpacing: 0,
title: ListTile(