design: Display own stories at first place and combine with new stories button
This commit is contained in:
parent
ce4641b091
commit
45826c826a
3 changed files with 116 additions and 85 deletions
|
|
@ -227,7 +227,11 @@ class StoryPageController extends State<StoryPage> {
|
|||
|
||||
void skip() {
|
||||
if (index + 1 >= max) {
|
||||
VRouter.of(context).to('/rooms');
|
||||
if (isOwnStory) {
|
||||
VRouter.of(context).to('/stories/create');
|
||||
} else {
|
||||
VRouter.of(context).to('/rooms');
|
||||
}
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
|
|
|
|||
|
|
@ -225,34 +225,34 @@ class StoryView extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
),
|
||||
SafeArea(
|
||||
child: 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),
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
gradient: event.messageType == MessageTypes.Text
|
||||
? LinearGradient(
|
||||
colors: [
|
||||
backgroundColorDark,
|
||||
backgroundColor,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
alignment: Alignment(
|
||||
controller.storyThemeData.alignmentX.toDouble() / 100,
|
||||
controller.storyThemeData.alignmentY.toDouble() / 100,
|
||||
),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
gradient: event.messageType == MessageTypes.Text
|
||||
? LinearGradient(
|
||||
colors: [
|
||||
backgroundColorDark,
|
||||
backgroundColor,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
alignment: Alignment(
|
||||
controller.storyThemeData.alignmentX.toDouble() / 100,
|
||||
controller.storyThemeData.alignmentY.toDouble() / 100,
|
||||
),
|
||||
child: SafeArea(
|
||||
child: GestureDetector(
|
||||
onTapDown: controller.hold,
|
||||
onTapUp: controller.unhold,
|
||||
onTapCancel: controller.unhold,
|
||||
onVerticalDragStart: controller.hold,
|
||||
onVerticalDragEnd: controller.unhold,
|
||||
onHorizontalDragStart: controller.hold,
|
||||
onHorizontalDragEnd: controller.unhold,
|
||||
child: LinkText(
|
||||
text: controller.loadingMode
|
||||
? L10n.of(context)!.loadingPleaseWait
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue