Update room subject; accept user_name in OWN_CONTACT_INFO
This commit is contained in:
parent
0c615b01fd
commit
4ee453d0d6
|
@ -257,6 +257,13 @@ Conversation::GetName() const
|
|||
}
|
||||
|
||||
|
||||
BString
|
||||
Conversation::GetSubject() const
|
||||
{
|
||||
return fSubject;
|
||||
}
|
||||
|
||||
|
||||
ConversationView*
|
||||
Conversation::GetView()
|
||||
{
|
||||
|
|
|
@ -50,9 +50,11 @@ public:
|
|||
ProtocolLooper* GetProtocolLooper() const;
|
||||
void SetProtocolLooper(ProtocolLooper* looper);
|
||||
|
||||
BString GetName() const;
|
||||
BString GetSubject() const;
|
||||
|
||||
BBitmap* ProtocolBitmap() const;
|
||||
BBitmap* IconBitmap() const;
|
||||
BString GetName() const;
|
||||
|
||||
ConversationView* GetView();
|
||||
void ShowView(bool typing, bool userAction);
|
||||
|
|
|
@ -250,6 +250,9 @@ Server::ImMessage(BMessage* msg)
|
|||
if (contact != NULL) {
|
||||
contact->GetProtocolLooper()->SetOwnId(contact->GetId());
|
||||
}
|
||||
BString name;
|
||||
if (msg->FindString("user_name", &name) == B_OK)
|
||||
contact->SetNotifyName(name);
|
||||
break;
|
||||
}
|
||||
case IM_CONTACT_INFO:
|
||||
|
|
|
@ -66,6 +66,12 @@ ConversationView::AttachedToWindow()
|
|||
BMessage* msg = fMessageQueue.RemoveItemAt(0);
|
||||
ImMessage(msg);
|
||||
}
|
||||
if (fConversation != NULL) {
|
||||
if (fNameTextView->Text() != fConversation->GetName())
|
||||
fNameTextView->SetText(fConversation->GetName());
|
||||
if (fSubjectTextView->Text() != fConversation->GetSubject())
|
||||
fSubjectTextView->SetText(fConversation->GetSubject());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -206,6 +212,7 @@ ConversationView::SetConversation(Conversation* chat)
|
|||
{
|
||||
fConversation = chat;
|
||||
fNameTextView->SetText(chat->GetName());
|
||||
fSubjectTextView->SetText(chat->GetSubject());
|
||||
fProtocolView->SetBitmap(chat->ProtocolBitmap());
|
||||
}
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue