🐛 Bug fixes and optimization
This commit is contained in:
@ -78,9 +78,9 @@ class _AccountScreenState extends State<AccountScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
return Column(
|
||||
return ListView(
|
||||
children: [
|
||||
const AccountHeading().paddingOnly(bottom: 8),
|
||||
const AccountHeading().paddingOnly(bottom: 8, top: 16),
|
||||
...(actionItems.map(
|
||||
(x) => ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 34),
|
||||
|
@ -27,7 +27,7 @@ class _NotificationScreenState extends State<NotificationScreen> {
|
||||
|
||||
List<int> markList = List.empty(growable: true);
|
||||
for (final element in provider.notifications) {
|
||||
if (element.isRealtime) continue;
|
||||
if (element.id <= 0) continue;
|
||||
markList.add(element.id);
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ class _NotificationScreenState extends State<NotificationScreen> {
|
||||
|
||||
final AccountProvider provider = Get.find();
|
||||
|
||||
if (element.isRealtime) {
|
||||
if (element.id <= 0) {
|
||||
provider.notifications.removeAt(index);
|
||||
return;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -337,37 +337,45 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
||||
children: [
|
||||
Expanded(
|
||||
child: PagedListView<int, Message>(
|
||||
clipBehavior: Clip.none,
|
||||
reverse: true,
|
||||
pagingController: _pagingController,
|
||||
builderDelegate: PagedChildBuilderDelegate<Message>(
|
||||
itemBuilder: buildHistory,
|
||||
noItemsFoundIndicatorBuilder: (_) => Container(),
|
||||
),
|
||||
).paddingOnly(bottom: 64),
|
||||
).paddingOnly(bottom: 56),
|
||||
),
|
||||
],
|
||||
),
|
||||
Positioned(
|
||||
bottom: math.max(MediaQuery.of(context).padding.bottom, 16),
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: ChatMessageInput(
|
||||
edit: _messageToEditing,
|
||||
reply: _messageToReplying,
|
||||
realm: widget.realm,
|
||||
placeholder: placeholder,
|
||||
channel: _channel!,
|
||||
onSent: (Message item) {
|
||||
setState(() {
|
||||
_pagingController.itemList?.insert(0, item);
|
||||
});
|
||||
},
|
||||
onReset: () {
|
||||
setState(() {
|
||||
_messageToReplying = null;
|
||||
_messageToEditing = null;
|
||||
});
|
||||
},
|
||||
child: ClipRect(
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 50, sigmaY: 50),
|
||||
child: SafeArea(
|
||||
child: ChatMessageInput(
|
||||
edit: _messageToEditing,
|
||||
reply: _messageToReplying,
|
||||
realm: widget.realm,
|
||||
placeholder: placeholder,
|
||||
channel: _channel!,
|
||||
onSent: (Message item) {
|
||||
setState(() {
|
||||
_pagingController.itemList?.insert(0, item);
|
||||
});
|
||||
},
|
||||
onReset: () {
|
||||
setState(() {
|
||||
_messageToReplying = null;
|
||||
_messageToEditing = null;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_ongoingCall != null)
|
||||
|
@ -72,7 +72,7 @@ class _ChannelDetailScreenState extends State<ChannelDetailScreen> {
|
||||
ListTile(
|
||||
leading: const Icon(Icons.edit),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
title: Text('channelAdjust'.tr),
|
||||
title: Text('channelAdjust'.tr.capitalize!),
|
||||
onTap: () async {
|
||||
AppRouter.instance
|
||||
.pushNamed(
|
||||
@ -129,12 +129,12 @@ class _ChannelDetailScreenState extends State<ChannelDetailScreen> {
|
||||
ListTile(
|
||||
leading: const Icon(Icons.settings),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
title: Text('channelSettings'.tr),
|
||||
title: Text('channelSettings'.tr.capitalize!),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.supervisor_account),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
title: Text('channelMembers'.tr),
|
||||
title: Text('channelMembers'.tr.capitalize!),
|
||||
onTap: () => showMemberList(),
|
||||
),
|
||||
...(_isOwned ? ownerActions : List.empty()),
|
||||
|
@ -69,7 +69,7 @@ class _RealmDetailScreenState extends State<RealmDetailScreen> {
|
||||
ListTile(
|
||||
leading: const Icon(Icons.edit),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
title: Text('realmAdjust'.tr),
|
||||
title: Text('realmAdjust'.tr.capitalize!),
|
||||
onTap: () async {
|
||||
AppRouter.instance
|
||||
.pushNamed(
|
||||
@ -122,12 +122,12 @@ class _RealmDetailScreenState extends State<RealmDetailScreen> {
|
||||
ListTile(
|
||||
leading: const Icon(Icons.settings),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
title: Text('realmSettings'.tr),
|
||||
title: Text('realmSettings'.tr.capitalize!),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.supervisor_account),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
title: Text('realmMembers'.tr),
|
||||
title: Text('realmMembers'.tr.capitalize!),
|
||||
onTap: () => showMemberList(),
|
||||
),
|
||||
...(_isOwned ? ownerActions : List.empty()),
|
||||
|
Reference in New Issue
Block a user