ui: (Kinda) make the last message text work
This commit is contained in:
@@ -88,17 +88,19 @@ class _ConversationPageState extends State<ConversationPage> {
|
||||
var args = ModalRoute.of(context)!.settings.arguments as ConversationPageArguments;
|
||||
|
||||
Conversation conversation = GetIt.I.get<ConversationRepository>().getConversation(args.jid)!;
|
||||
String jid = conversation.jid;
|
||||
|
||||
return StoreConnector<MoxxyState, _MessageListViewModel>(
|
||||
converter: (store) => _MessageListViewModel(
|
||||
// TODO
|
||||
messages: store.state.messages.containsKey("") ? store.state.messages[""]! : [],
|
||||
messages: store.state.messages.containsKey(jid) ? store.state.messages[jid]! : [],
|
||||
sendMessage: (body) => store.dispatch(
|
||||
// TODO
|
||||
AddMessageAction(
|
||||
from: "UwU",
|
||||
timestamp: "12:00",
|
||||
body: body,
|
||||
jid: jid
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
@@ -25,6 +25,8 @@ class NewConversationPage extends StatelessWidget {
|
||||
|
||||
if (conversation == null) {
|
||||
// TODO
|
||||
// TODO: Install a middleware to make sure that the conversation gets added to the
|
||||
// repository. Also handle updates
|
||||
conversation = Conversation(
|
||||
title: jid,
|
||||
jid: jid,
|
||||
|
||||
@@ -40,6 +40,7 @@ class ConversationsListRow extends StatelessWidget {
|
||||
this.name,
|
||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
|
||||
),
|
||||
// TODO: Change color, font size and truncate the text when too long
|
||||
Text(this.lastMessageBody)
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user