mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-19 10:39:26 +01:00
Merge branch 'krille/better-story-viewer' into 'main'
chore: Minor story viewer fixes See merge request famedly/fluffychat!768
This commit is contained in:
commit
c4609edb52
@ -172,15 +172,7 @@ class StoryView extends StatelessWidget {
|
|||||||
controller.loadingModeOff();
|
controller.loadingModeOff();
|
||||||
}
|
}
|
||||||
final hash = event.infoMap['xyz.amorgan.blurhash'];
|
final hash = event.infoMap['xyz.amorgan.blurhash'];
|
||||||
return GestureDetector(
|
return Stack(
|
||||||
onTapDown: controller.hold,
|
|
||||||
onTapUp: controller.unhold,
|
|
||||||
onTapCancel: controller.unhold,
|
|
||||||
onVerticalDragStart: controller.hold,
|
|
||||||
onVerticalDragEnd: controller.unhold,
|
|
||||||
onHorizontalDragStart: controller.hold,
|
|
||||||
onHorizontalDragEnd: controller.unhold,
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
children: [
|
||||||
if (hash is String)
|
if (hash is String)
|
||||||
BlurHash(
|
BlurHash(
|
||||||
@ -204,8 +196,7 @@ class StoryView extends StatelessWidget {
|
|||||||
return Container();
|
return Container();
|
||||||
}
|
}
|
||||||
controller.loadingModeOff();
|
controller.loadingModeOff();
|
||||||
return Center(
|
return Center(child: VideoPlayer(videoPlayerController));
|
||||||
child: VideoPlayer(videoPlayerController));
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -230,7 +221,15 @@ class StoryView extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
AnimatedContainer(
|
GestureDetector(
|
||||||
|
onTapDown: controller.hold,
|
||||||
|
onTapUp: controller.unhold,
|
||||||
|
onTapCancel: controller.unhold,
|
||||||
|
onVerticalDragStart: controller.hold,
|
||||||
|
onVerticalDragEnd: controller.unhold,
|
||||||
|
onHorizontalDragStart: controller.hold,
|
||||||
|
onHorizontalDragEnd: controller.unhold,
|
||||||
|
child: AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 8.0,
|
horizontal: 8.0,
|
||||||
@ -275,6 +274,7 @@ class StoryView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 4,
|
top: 4,
|
||||||
left: 4,
|
left: 4,
|
||||||
@ -317,8 +317,6 @@ class StoryView extends StatelessWidget {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
focusNode: controller.replyFocus,
|
focusNode: controller.replyFocus,
|
||||||
controller: controller.replyController,
|
controller: controller.replyController,
|
||||||
minLines: 1,
|
|
||||||
maxLines: 7,
|
|
||||||
onSubmitted: controller.replyAction,
|
onSubmitted: controller.replyAction,
|
||||||
textInputAction: TextInputAction.send,
|
textInputAction: TextInputAction.send,
|
||||||
readOnly: controller.replyLoading,
|
readOnly: controller.replyLoading,
|
||||||
@ -329,8 +327,14 @@ class StoryView extends StatelessWidget {
|
|||||||
icon: const Icon(Icons.emoji_emotions_outlined),
|
icon: const Icon(Icons.emoji_emotions_outlined),
|
||||||
),
|
),
|
||||||
suffixIcon: controller.replyLoading
|
suffixIcon: controller.replyLoading
|
||||||
? const CircularProgressIndicator.adaptive(
|
? const SizedBox(
|
||||||
strokeWidth: 2)
|
width: 16,
|
||||||
|
height: 16,
|
||||||
|
child: Center(
|
||||||
|
child: CircularProgressIndicator.adaptive(
|
||||||
|
strokeWidth: 2),
|
||||||
|
),
|
||||||
|
)
|
||||||
: IconButton(
|
: IconButton(
|
||||||
onPressed: controller.replyAction,
|
onPressed: controller.replyAction,
|
||||||
icon: const Icon(Icons.send_outlined),
|
icon: const Icon(Icons.send_outlined),
|
||||||
@ -360,7 +364,6 @@ class StoryView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user