mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:28:41 +00:00
fix #136
This commit is contained in:
parent
26af9460a6
commit
ac9820261c
7 changed files with 51 additions and 24 deletions
|
|
@ -73,6 +73,7 @@
|
|||
"contextMenuPin": "Anheften",
|
||||
"contextMenuUnpin": "Lösen",
|
||||
"mediaViewerAuthReason": "Bitte authentifiziere dich, um diesen twonly zu sehen!",
|
||||
"mediaViewerTwonlyTapToOpen": "Tippe um den twonly zu öffnen!",
|
||||
"messageSendState_Received": "Empfangen",
|
||||
"messageSendState_Opened": "Geöffnet",
|
||||
"messageSendState_Send": "Gesendet",
|
||||
|
|
|
|||
|
|
@ -120,6 +120,8 @@
|
|||
"@contextMenuUnpin": {},
|
||||
"mediaViewerAuthReason": "Please authenticate to see this twonly!",
|
||||
"@mediaViewerAuthReason": {},
|
||||
"mediaViewerTwonlyTapToOpen": "Tap to open your twonly!",
|
||||
"@mediaViewerTwonlyTapToOpen": {},
|
||||
"messageSendState_Received": "Received",
|
||||
"@messageSendState_Received": {},
|
||||
"messageSendState_Opened": "Opened",
|
||||
|
|
|
|||
|
|
@ -443,6 +443,12 @@ abstract class AppLocalizations {
|
|||
/// **'Please authenticate to see this twonly!'**
|
||||
String get mediaViewerAuthReason;
|
||||
|
||||
/// No description provided for @mediaViewerTwonlyTapToOpen.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Tap to open your twonly!'**
|
||||
String get mediaViewerTwonlyTapToOpen;
|
||||
|
||||
/// No description provided for @messageSendState_Received.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
|
|
|||
|
|
@ -184,6 +184,9 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||
@override
|
||||
String get mediaViewerAuthReason => 'Bitte authentifiziere dich, um diesen twonly zu sehen!';
|
||||
|
||||
@override
|
||||
String get mediaViewerTwonlyTapToOpen => 'Tippe um den twonly zu öffnen!';
|
||||
|
||||
@override
|
||||
String get messageSendState_Received => 'Empfangen';
|
||||
|
||||
|
|
|
|||
|
|
@ -184,6 +184,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
String get mediaViewerAuthReason => 'Please authenticate to see this twonly!';
|
||||
|
||||
@override
|
||||
String get mediaViewerTwonlyTapToOpen => 'Tap to open your twonly!';
|
||||
|
||||
@override
|
||||
String get messageSendState_Received => 'Received';
|
||||
|
||||
|
|
|
|||
|
|
@ -187,11 +187,13 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
|||
return;
|
||||
}
|
||||
if (maxShowTime == gMediaShowInfinite) {
|
||||
maxShowTime = 4;
|
||||
} else if (maxShowTime >= 22) {
|
||||
maxShowTime = gMediaShowInfinite;
|
||||
maxShowTime = 1;
|
||||
} else if (maxShowTime == 1) {
|
||||
maxShowTime = 5;
|
||||
} else if (maxShowTime == 5) {
|
||||
maxShowTime = 20;
|
||||
} else {
|
||||
maxShowTime = maxShowTime + 8;
|
||||
maxShowTime = gMediaShowInfinite;
|
||||
}
|
||||
setState(() {});
|
||||
var user = await getUser();
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
|
||||
bool imageSaved = false;
|
||||
bool imageSaving = false;
|
||||
bool isMounted = true;
|
||||
|
||||
StreamSubscription<Message?>? downloadStateListener;
|
||||
|
||||
|
|
@ -268,6 +269,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
_subscription.cancel();
|
||||
downloadStateListener?.cancel();
|
||||
videoController?.dispose();
|
||||
isMounted = false;
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
|
@ -390,11 +392,16 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
IconButton.outlined(
|
||||
icon: FaIcon(FontAwesomeIcons.camera),
|
||||
onPressed: () async {
|
||||
nextMediaTimer?.cancel();
|
||||
progressTimer?.cancel();
|
||||
await Navigator.push(context, MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return CameraSendToView(widget.contact);
|
||||
},
|
||||
));
|
||||
if (isMounted && maxShowTime != gMediaShowInfinite) {
|
||||
nextMediaOrExit();
|
||||
}
|
||||
},
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all<EdgeInsets>(
|
||||
|
|
@ -481,7 +488,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(bottom: 200),
|
||||
child: Text("Tap to open your twonly!"),
|
||||
child: Text(context.lang.mediaViewerTwonlyTapToOpen),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -658,13 +665,29 @@ class _ReactionButtonsState extends State<ReactionButtons> {
|
|||
child: AnimatedOpacity(
|
||||
opacity: widget.show ? 1.0 : 0.0, // Fade in/out
|
||||
duration: Duration(milliseconds: 150),
|
||||
child: Column(
|
||||
children: [
|
||||
if (secondRowEmojis.isNotEmpty)
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: Column(
|
||||
children: [
|
||||
if (secondRowEmojis.isNotEmpty)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: secondRowEmojis
|
||||
.map((emoji) => EmojiReactionWidget(
|
||||
userId: widget.userId,
|
||||
responseToMessageId: widget.responseToMessageId,
|
||||
hide: widget.hide,
|
||||
show: widget.show,
|
||||
emoji: emoji,
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
if (secondRowEmojis.isNotEmpty) SizedBox(height: 15),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: secondRowEmojis
|
||||
children: firstRowEmojis
|
||||
.map((emoji) => EmojiReactionWidget(
|
||||
userId: widget.userId,
|
||||
responseToMessageId: widget.responseToMessageId,
|
||||
|
|
@ -674,21 +697,8 @@ class _ReactionButtonsState extends State<ReactionButtons> {
|
|||
))
|
||||
.toList(),
|
||||
),
|
||||
if (secondRowEmojis.isNotEmpty) SizedBox(height: 15),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: firstRowEmojis
|
||||
.map((emoji) => EmojiReactionWidget(
|
||||
userId: widget.userId,
|
||||
responseToMessageId: widget.responseToMessageId,
|
||||
hide: widget.hide,
|
||||
show: widget.show,
|
||||
emoji: emoji,
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue