feat: implement pinned messages
- render pinned events on the chat top - support scroll up for several pinned messages - ask to unpin messages - add button to pin message - fix some null-safety issues - fix the Linux database directly for debug builds Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
parent
9272376fc5
commit
704fd404b1
10 changed files with 169 additions and 32 deletions
|
|
@ -12,6 +12,7 @@ import 'package:fluffychat/config/app_config.dart';
|
|||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pages/chat/chat.dart';
|
||||
import 'package:fluffychat/pages/chat/chat_app_bar_title.dart';
|
||||
import 'package:fluffychat/pages/chat/pinned_events.dart';
|
||||
import 'package:fluffychat/pages/chat/reactions_picker.dart';
|
||||
import 'package:fluffychat/pages/chat/reply_display.dart';
|
||||
import 'package:fluffychat/pages/chat/seen_by_row.dart';
|
||||
|
|
@ -62,6 +63,11 @@ class ChatView extends StatelessWidget {
|
|||
tooltip: L10n.of(context)!.redactMessage,
|
||||
onPressed: controller.redactEventsAction,
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.push_pin),
|
||||
onPressed: controller.pinEvent,
|
||||
tooltip: L10n.of(context)!.pinMessage,
|
||||
),
|
||||
if (controller.selectedEvents.length == 1)
|
||||
PopupMenuButton<_EventContextAction>(
|
||||
onSelected: (action) {
|
||||
|
|
@ -208,6 +214,7 @@ class ChatView extends StatelessWidget {
|
|||
child: Column(
|
||||
children: <Widget>[
|
||||
TombstoneDisplay(controller),
|
||||
PinnedEvents(controller),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: controller.clearSingleSelectedEvent,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue