Compare commits
1 commit
734e7f57df
...
f00c9abb04
| Author | SHA1 | Date | |
|---|---|---|---|
|
f00c9abb04 |
3 changed files with 19 additions and 7 deletions
|
|
@ -113,7 +113,6 @@ class RoomChatController extends AsyncNotifier<IList<Event>> {
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
const ISet.empty(),
|
const ISet.empty(),
|
||||||
addToNewEvents: false,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return response.hasMore;
|
return response.hasMore;
|
||||||
|
|
@ -158,7 +157,23 @@ class RoomChatController extends AsyncNotifier<IList<Event>> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// state = state TODO
|
// TODO: Add new event to timeline whilst its sending
|
||||||
|
// ref
|
||||||
|
// .watch(RoomsController.provider.notifier)
|
||||||
|
// .update(
|
||||||
|
// {
|
||||||
|
// roomId: Room(
|
||||||
|
// events: [event].toIList(),
|
||||||
|
// timeline: [
|
||||||
|
// TimelineRowTuple(
|
||||||
|
// timelineRowId: event.timelineRowId,
|
||||||
|
// eventRowId: event.rowId,
|
||||||
|
// ),
|
||||||
|
// ].toIList(),
|
||||||
|
// ),
|
||||||
|
// }.toIMap(),
|
||||||
|
// const ISet.empty(),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> removeReaction(
|
Future<void> removeReaction(
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,7 @@ class RoomsController extends Notifier<IMap<String, Room>> {
|
||||||
@override
|
@override
|
||||||
IMap<String, Room> build() => const IMap.empty();
|
IMap<String, Room> build() => const IMap.empty();
|
||||||
|
|
||||||
void update(
|
void update(IMap<String, Room> rooms, ISet<String> leftRooms) {
|
||||||
IMap<String, Room> rooms,
|
|
||||||
ISet<String> leftRooms, {
|
|
||||||
bool addToNewEvents = true,
|
|
||||||
}) {
|
|
||||||
final merged = rooms.entries.fold(state, (acc, entry) {
|
final merged = rooms.entries.fold(state, (acc, entry) {
|
||||||
final roomId = entry.key;
|
final roomId = entry.key;
|
||||||
final incoming = entry.value;
|
final incoming = entry.value;
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ class EventRenderer extends ConsumerWidget {
|
||||||
spacing: 4,
|
spacing: 4,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
Text(event.timelineRowId.toString()),
|
||||||
if (!isGrouped && !textOnly)
|
if (!isGrouped && !textOnly)
|
||||||
Row(
|
Row(
|
||||||
spacing: 4,
|
spacing: 4,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue