Compare commits

...

3 commits

3 changed files with 11 additions and 6 deletions

View file

@ -30,6 +30,7 @@ class AvatarOrHash extends ConsumerWidget {
color: ColorHash(title).color,
child: Center(child: Text(title.isEmpty ? "" : title[0])),
);
final parsedAvatar = avatar?.mxcToHttps(
ref.watch(
ClientStateController.provider.select(
@ -38,6 +39,7 @@ class AvatarOrHash extends ConsumerWidget {
) ??
"",
);
return SizedBox(
width: height,
height: height,
@ -62,8 +64,8 @@ class AvatarOrHash extends ConsumerWidget {
),
fit: .cover,
loadingBuilder: (_, child, loadingProgress) =>
loadingProgress == null ? child : box,
errorBuilder: (_, _, _) => box,
loadingProgress == null ? child : fallback ?? box,
errorBuilder: (_, _, _) => fallback ?? box,
),
),
),

View file

@ -21,9 +21,12 @@ class ExpandableImage extends ConsumerWidget {
builder: (context, constraints) => Dialog(
backgroundColor: Colors.transparent,
insetPadding: .all(constraints.maxWidth / 100),
child: ConstrainedBox(
constraints: .new(minWidth: min(constraints.maxWidth, 1000)),
child: InteractiveViewer(
child: InteractiveViewer(
maxScale: 5,
child: ConstrainedBox(
constraints: .new(
minWidth: min(constraints.maxWidth, 1000),
),
child: Image(
fit: .contain,
errorBuilder: (_, error, stackTrace) => ErrorDialog(

View file

@ -38,7 +38,7 @@ flutter.buildFlutterApplication {
postInstall = ''
install -D assets/icon.svg $out/share/icons/hicolor/scalable/apps/nexus.svg
install -Dm755 linux/nexus.federated.Nexus.desktop -t $out/share/applications
wrapProgram $out/bin/nexus \
wrapProgram $out/bin/nexus \
--suffix LD_LIBRARY_PATH : $out/app/nexus/lib
'';