mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 14:48:41 +00:00
fix #177
This commit is contained in:
parent
eda23b1f03
commit
25ccbd0158
1 changed files with 25 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import 'package:logging/logging.dart';
|
||||||
import 'package:lottie/lottie.dart';
|
import 'package:lottie/lottie.dart';
|
||||||
import 'package:no_screenshot/no_screenshot.dart';
|
import 'package:no_screenshot/no_screenshot.dart';
|
||||||
import 'package:twonly/globals.dart';
|
import 'package:twonly/globals.dart';
|
||||||
|
import 'package:twonly/src/database/daos/contacts_dao.dart';
|
||||||
import 'package:twonly/src/views/camera/share_image_editor_view.dart';
|
import 'package:twonly/src/views/camera/share_image_editor_view.dart';
|
||||||
import 'package:twonly/src/views/components/animate_icon.dart';
|
import 'package:twonly/src/views/components/animate_icon.dart';
|
||||||
import 'package:twonly/src/views/components/media_view_sizing.dart';
|
import 'package:twonly/src/views/components/media_view_sizing.dart';
|
||||||
|
|
@ -553,6 +554,26 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (showSendTextMessageInput)
|
||||||
|
Positioned(
|
||||||
|
top: 20,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
child: Text(
|
||||||
|
getContactDisplayName(widget.contact),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
shadows: [
|
||||||
|
Shadow(
|
||||||
|
color: const Color.fromARGB(122, 0, 0, 0),
|
||||||
|
blurRadius: 5.0,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
if (showSendTextMessageInput)
|
if (showSendTextMessageInput)
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
|
|
@ -614,6 +635,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
if (allMediaFiles.isNotEmpty)
|
if (allMediaFiles.isNotEmpty)
|
||||||
ReactionButtons(
|
ReactionButtons(
|
||||||
show: showShortReactions,
|
show: showShortReactions,
|
||||||
|
textInputFocused: showSendTextMessageInput,
|
||||||
userId: widget.contact.userId,
|
userId: widget.contact.userId,
|
||||||
responseToMessageId: allMediaFiles.first.messageOtherId!,
|
responseToMessageId: allMediaFiles.first.messageOtherId!,
|
||||||
hide: () {
|
hide: () {
|
||||||
|
|
@ -634,11 +656,13 @@ class ReactionButtons extends StatefulWidget {
|
||||||
const ReactionButtons(
|
const ReactionButtons(
|
||||||
{super.key,
|
{super.key,
|
||||||
required this.show,
|
required this.show,
|
||||||
|
required this.textInputFocused,
|
||||||
required this.userId,
|
required this.userId,
|
||||||
required this.responseToMessageId,
|
required this.responseToMessageId,
|
||||||
required this.hide});
|
required this.hide});
|
||||||
|
|
||||||
final bool show;
|
final bool show;
|
||||||
|
final bool textInputFocused;
|
||||||
final int userId;
|
final int userId;
|
||||||
final int responseToMessageId;
|
final int responseToMessageId;
|
||||||
final Function() hide;
|
final Function() hide;
|
||||||
|
|
@ -675,7 +699,7 @@ class _ReactionButtonsState extends State<ReactionButtons> {
|
||||||
|
|
||||||
return AnimatedPositioned(
|
return AnimatedPositioned(
|
||||||
duration: Duration(milliseconds: 200), // Animation duration
|
duration: Duration(milliseconds: 200), // Animation duration
|
||||||
bottom: widget.show ? 80 : 60,
|
bottom: widget.show ? (widget.textInputFocused ? 50 : 80) : 60,
|
||||||
left: widget.show ? 0 : 150,
|
left: widget.show ? 0 : 150,
|
||||||
right: widget.show ? 0 : 150,
|
right: widget.show ? 0 : 150,
|
||||||
curve: Curves.linearToEaseOut,
|
curve: Curves.linearToEaseOut,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue