mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 09:49:26 +00:00
fix(BasicChatRoom): do not notify chat room state when it is fetched from database
This commit is contained in:
parent
146042ac6d
commit
a531204489
3 changed files with 9 additions and 5 deletions
|
|
@ -69,7 +69,6 @@ public:
|
|||
std::shared_ptr<ChatMessage> createChatMessage (ChatMessage::Direction direction);
|
||||
|
||||
LinphoneCall *call = nullptr;
|
||||
ChatRoom::State state = ChatRoom::State::None;
|
||||
bool isComposing = false;
|
||||
std::list<Address> remoteIsComposing;
|
||||
std::list<std::shared_ptr<EventLog>> transientEvents;
|
||||
|
|
@ -82,6 +81,8 @@ public:
|
|||
|
||||
// TODO: Check all fields before this point.
|
||||
|
||||
ChatRoom::State state = ChatRoom::State::None;
|
||||
|
||||
public:
|
||||
virtual void onChatMessageReceived (const std::shared_ptr<ChatMessage> &chatMessage) = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ static IdentityAddress getDefaultLocalAddress (const shared_ptr<Core> &core, con
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
shared_ptr<ChatRoom> CorePrivate::createBasicChatRoom (const ChatRoomId &chatRoomId, bool isRtt) {
|
||||
shared_ptr<ChatRoom> CorePrivate::createBasicChatRoom (const ChatRoomId &chatRoomId, bool isRtt, bool notifyCreation) {
|
||||
L_Q();
|
||||
|
||||
shared_ptr<ChatRoom> chatRoom;
|
||||
|
|
@ -73,8 +73,11 @@ shared_ptr<ChatRoom> CorePrivate::createBasicChatRoom (const ChatRoomId &chatRoo
|
|||
|
||||
ChatRoomPrivate *dChatRoom = chatRoom->getPrivate();
|
||||
|
||||
dChatRoom->setState(ChatRoom::State::Instantiated);
|
||||
dChatRoom->setState(ChatRoom::State::Created);
|
||||
if (notifyCreation) {
|
||||
dChatRoom->setState(ChatRoom::State::Instantiated);
|
||||
dChatRoom->setState(ChatRoom::State::Created);
|
||||
} else
|
||||
dChatRoom->state = ChatRoom::State::Created;
|
||||
|
||||
return chatRoom;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
void insertChatRoom (const std::shared_ptr<ChatRoom> &chatRoom);
|
||||
void insertChatRoomWithDb (const std::shared_ptr<ChatRoom> &chatRoom);
|
||||
std::shared_ptr<ChatRoom> createBasicChatRoom (const ChatRoomId &chatRoomId, bool isRtt);
|
||||
std::shared_ptr<ChatRoom> createBasicChatRoom (const ChatRoomId &chatRoomId, bool isRtt, bool notifyCreation = true);
|
||||
|
||||
std::unique_ptr<MainDb> mainDb;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue