No functional change; remove unused 'join' message
… also slight formatting tweaks, safer fetching of a Conversation's list item in MainWindow, and an extra accessor for ConversationListView.
This commit is contained in:
parent
3689f6cee3
commit
2f69f2fa04
|
@ -24,7 +24,7 @@ public:
|
||||||
virtual void ObserveInteger(int32 what, int32 value);
|
virtual void ObserveInteger(int32 what, int32 value);
|
||||||
|
|
||||||
void SetDefaultSelection(BMenuItem* item);
|
void SetDefaultSelection(BMenuItem* item);
|
||||||
int64 GetDefaultSelection() { return fDefaultSelection; }
|
static int64 GetDefaultSelection() { return fDefaultSelection; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _PopulateMenu();
|
void _PopulateMenu();
|
||||||
|
|
|
@ -136,20 +136,6 @@ ConversationView::ImMessage(BMessage* msg)
|
||||||
fReceiveView->ScrollToBottom();
|
fReceiveView->ScrollToBottom();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IM_ROOM_JOINED:
|
|
||||||
{
|
|
||||||
BMessage msg;
|
|
||||||
msg.AddString("body", B_TRANSLATE("** You joined the room.\n"));
|
|
||||||
_AppendOrEnqueueMessage(&msg);
|
|
||||||
fReceiveView->ScrollToBottom();
|
|
||||||
}
|
|
||||||
case IM_ROOM_CREATED:
|
|
||||||
{
|
|
||||||
BMessage msg;
|
|
||||||
msg.AddString("body", B_TRANSLATE("** You created the room.\n"));
|
|
||||||
_AppendOrEnqueueMessage(&msg);
|
|
||||||
fReceiveView->ScrollToBottom();
|
|
||||||
}
|
|
||||||
case IM_ROOM_PARTICIPANT_JOINED:
|
case IM_ROOM_PARTICIPANT_JOINED:
|
||||||
{
|
{
|
||||||
_UserMessage(B_TRANSLATE("%user% has joined the room.\n"),
|
_UserMessage(B_TRANSLATE("%user% has joined the room.\n"),
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#include <iostream>
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
||||||
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
||||||
|
@ -641,9 +640,8 @@ MainWindow::_EnsureConversationItem(BMessage* msg)
|
||||||
|
|
||||||
BString chat_id = msg->FindString("chat_id");
|
BString chat_id = msg->FindString("chat_id");
|
||||||
Conversation* chat = fServer->ConversationById(chat_id, msg->FindInt64("instance"));
|
Conversation* chat = fServer->ConversationById(chat_id, msg->FindInt64("instance"));
|
||||||
ConversationItem* item = chat->GetListItem();
|
ConversationItem* item;
|
||||||
|
if (chat != NULL && (item = chat->GetListItem()) != NULL) {
|
||||||
if (chat != NULL) {
|
|
||||||
if (fListView->HasItem(item))
|
if (fListView->HasItem(item))
|
||||||
fListView->InvalidateItem(fListView->IndexOf(item));
|
fListView->InvalidateItem(fListView->IndexOf(item));
|
||||||
else if (item != NULL) {
|
else if (item != NULL) {
|
||||||
|
|
Ŝarĝante…
Reference in New Issue