1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 22:39:22 +00:00

Fix bad translation settings

This commit is contained in:
Pierre HUBERT 2021-03-13 18:28:56 +01:00
parent b1b7772532
commit 30b3dc6921
2 changed files with 17 additions and 6 deletions

View File

@ -1,11 +1,10 @@
import 'package:clipboard/clipboard.dart';
import 'package:comunic/models/conversation_message.dart';
import 'package:comunic/models/user.dart';
import 'package:comunic/ui/widgets/conversation_file_tile.dart';
import 'package:comunic/ui/widgets/text_widget.dart';
import 'package:comunic/utils/clipboard_utils.dart';
import 'package:comunic/utils/date_utils.dart';
import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart';
/// Conversation message tile
@ -120,13 +119,11 @@ class ConversationMessageTile extends StatelessWidget {
void _menuOptionSelected(BuildContext context, _MenuChoices value) {
switch (value) {
case _MenuChoices.COPY_MESSAGE:
FlutterClipboard.copy(message.message.content);
snack(context, tr("'${message.message.content}' copied to clipboard!"));
copyToClipboard(context, message.message.content);
break;
case _MenuChoices.COPY_URL:
FlutterClipboard.copy(message.file.url);
snack(context, tr("'${message.file.url}' copied to clipboard!"));
copyToClipboard(context, message.message.content);
break;
case _MenuChoices.GET_STATS:

View File

@ -0,0 +1,14 @@
import 'package:clipboard/clipboard.dart';
import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/cupertino.dart';
import 'intl_utils.dart';
/// Clipboard utilities
///
/// @author Pierre Hubert
void copyToClipboard(BuildContext context, String content) {
FlutterClipboard.copy(content);
snack(context, tr("'%1%' copied to clipboard!", args: {"1": content}));
}