refactor: Switch to Hive Collections DB

This commit is contained in:
Christian Pauly 2022-05-30 13:44:05 +02:00
commit c249ebb97c
29 changed files with 347 additions and 216 deletions

View file

@ -39,16 +39,24 @@ class StateMessage extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
event.getLocalizedBody(MatrixLocals(L10n.of(context)!)),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14 * AppConfig.fontSizeFactor,
color: Theme.of(context).textTheme.bodyText2!.color,
decoration:
event.redacted ? TextDecoration.lineThrough : null,
),
),
FutureBuilder<String>(
future: event
.calcLocalizedBody(MatrixLocals(L10n.of(context)!)),
builder: (context, snapshot) {
return Text(
snapshot.data ??
event.calcLocalizedBodyFallback(
MatrixLocals(L10n.of(context)!)),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14 * AppConfig.fontSizeFactor,
color: Theme.of(context).textTheme.bodyText2!.color,
decoration: event.redacted
? TextDecoration.lineThrough
: null,
),
);
}),
if (counter != 0)
Text(
L10n.of(context)!.moreEvents(counter),