Skip to content

Commit

Permalink
krille-chan#79 FluffyChat: read receipt overview pixel overflow fixed…
Browse files Browse the repository at this point in the history
… and icon moved to avatar
  • Loading branch information
carowebtec authored and Caroline committed Mar 29, 2023
1 parent dca5bc1 commit abbbe8c
Showing 1 changed file with 92 additions and 62 deletions.
154 changes: 92 additions & 62 deletions lib/pages/read_receipt_overview/read_receipt_overview_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,88 +25,118 @@ class ReadReceiptOverviewView extends StatelessWidget {
title: Text(
L10n.of(context)!.readReceipts,
),
actions: [],
actions: const [],
),
extendBodyBehindAppBar: false,
body: MaxWidthBody(
withScrolling: true,
maxWidth: 800,
child: controller.roomsLoaded
? controller.panelItems.isNotEmpty
? Column(mainAxisSize: MainAxisSize.min, children: [
ExpansionPanelList(
dividerColor: AppConfig.primaryColorLight,
expansionCallback: controller.expansionCallback,
children: controller.panelItems.values
.toList()
.asMap()
.keys
.toList()
.map((var index) {
final item =
controller.panelItems.values.elementAt(index);
final room = item.room!;
return ExpansionPanel(
? Column(
mainAxisSize: MainAxisSize.min,
children: [
ExpansionPanelList(
dividerColor: AppConfig.primaryColorLight,
expansionCallback: controller.expansionCallback,
children: controller.panelItems.values
.toList()
.asMap()
.keys
.toList()
.map((var index) {
final item =
controller.panelItems.values.elementAt(index);
final room = item.room!;
return ExpansionPanel(
canTapOnHeader: true,
isExpanded: item.isExpanded,
headerBuilder: (context, isExpanded) {
return Padding(
padding:
const EdgeInsets.symmetric(vertical: 10),
child: ListTile(
tileColor: Theme.of(context)
.colorScheme
.secondaryContainer
.withAlpha(210),
leading: Avatar(
padding:
const EdgeInsets.symmetric(vertical: 10),
child: ListTile(
tileColor: Theme.of(context)
.colorScheme
.secondaryContainer
.withAlpha(210),
leading: Stack(children: [
Padding(
padding: const EdgeInsets.only(
right: 6, bottom: 4),
child: Avatar(
mxContent: room.avatar,
name: room.displayname,
name: room.getLocalizedDisplayname(),
size: 38,
fontSize: 16,
),
title: Row(children: [
Text(room.displayname),
if (item.hasToGiveReadReceipt)
const Padding(
padding:
EdgeInsets.only(left: 10),
child: Icon(
Icons.mark_chat_read_outlined,
color: AppConfig.primaryColor,
size: 20,
))
])));
),
if (item.hasToGiveReadReceipt)
const Positioned(
bottom: 0,
right: 0,
child: Icon(
Icons.mark_chat_read,
color: AppConfig.primaryColor,
size: 20,
))
]),
title: Wrap(
children: [
Text(
room.getLocalizedDisplayname(),
overflow: TextOverflow.clip,
),
],
),
),
);
},
body: Padding(
padding: const EdgeInsets.only(bottom: 15),
child: item.messagesLoaded == true
? Column(children: [
padding: const EdgeInsets.only(bottom: 15),
child: item.messagesLoaded == true
? Column(
children: [
if (item.messages.isEmpty)
Text(L10n.of(context)!
.noReadReceiptRequestsFound)
Text(
L10n.of(context)!
.noReadReceiptRequestsFound,
)
else
for (var message in item.messages)
Padding(
padding: const EdgeInsets.only(
right: 25),
child: Message(message,
onSwipe:
(swipeDirection) {},
onReadReceipt: (event) =>
controller
.onReadReceiptClick(
event, item),
onSelect: (event) {},
timeline: item.timeline!)),
])
: const Center(
child:
CircularProgressIndicator.adaptive(
strokeWidth: 2),
)));
}).toList(),
),
])
padding: const EdgeInsets.only(
right: 25,
),
child: Message(
message,
onSwipe: (swipeDirection) {},
onReadReceipt: (event) =>
controller
.onReadReceiptClick(
event,
item,
),
onSelect: (event) {},
timeline: item.timeline!,
),
),
],
)
: const Center(
child: CircularProgressIndicator.adaptive(
strokeWidth: 2,
),
),
),
);
}).toList(),
),
],
)
: Center(
child: Text(L10n.of(context)!.noReadReceiptRequestsFound))
child: Text(L10n.of(context)!.noReadReceiptRequestsFound),
)
: const Center(
child: CircularProgressIndicator.adaptive(strokeWidth: 2),
),
Expand Down

0 comments on commit abbbe8c

Please # to comment.