3333import io .kommunicate .devkit .api .conversation .Message ;
3434import io .kommunicate .devkit .api .conversation .database .MessageDatabaseService ;
3535import io .kommunicate .devkit .broadcast .BroadcastService ;
36+ import io .kommunicate .devkit .broadcast .EventManager ;
3637import io .kommunicate .devkit .channel .service .ChannelService ;
3738import io .kommunicate .devkit .contact .AppContactService ;
3839import io .kommunicate .devkit .contact .BaseContactService ;
@@ -140,6 +141,7 @@ public ConversationFragment getConversationFragment() {
140141 Integer conversationId = ((ConversationActivity ) fragmentActivity ).getConversationId ();
141142 conversationFragment = getConversationFragment (fragmentActivity , contact , channel , conversationId , null , null , null );
142143 ConversationActivity .addFragment (fragmentActivity , conversationFragment , CONVERSATION_FRAGMENT );
144+ EventManager .getInstance ().sendOnCurrentOpenedConversation (conversationId );
143145 }
144146 return conversationFragment ;
145147 }
@@ -152,6 +154,7 @@ public void run() {
152154 if (conversationFragment == null ) {
153155 conversationFragment = getConversationFragment (fragmentActivity , contact , null , conversationId , searchString , messageSearchString , null );
154156 ((MobiComKitActivityInterface ) fragmentActivity ).addFragment (conversationFragment );
157+ EventManager .getInstance ().sendOnCurrentOpenedConversation (conversationId );
155158 } else {
156159 MessageInfoFragment messageInfoFragment = (MessageInfoFragment ) UIService .getFragmentByTag (fragmentActivity , ConversationUIService .MESSGAE_INFO_FRAGMENT );
157160 if (messageInfoFragment != null ) {
@@ -160,6 +163,7 @@ public void run() {
160163 }
161164 }
162165 conversationFragment .loadConversation (contact , conversationId , messageSearchString );
166+ EventManager .getInstance ().sendOnCurrentOpenedConversation (conversationId );
163167 }
164168 }
165169 });
@@ -173,6 +177,7 @@ public void run() {
173177 if (conversationFragment == null ) {
174178 conversationFragment = getConversationFragment (fragmentActivity , null , channel , conversationId , searchString , messageSearchString , preFilledMessage );
175179 ((MobiComKitActivityInterface ) fragmentActivity ).addFragment (conversationFragment );
180+ EventManager .getInstance ().sendOnCurrentOpenedConversation (conversationId );
176181 } else {
177182 MessageInfoFragment messageInfoFragment = (MessageInfoFragment ) UIService .getFragmentByTag (fragmentActivity , ConversationUIService .MESSGAE_INFO_FRAGMENT );
178183 if (messageInfoFragment != null && fragmentActivity .getSupportFragmentManager () != null ) {
0 commit comments