Fixed unread chat message count in tab bar not updated after reply in notification
This commit is contained in:
parent
cd1449c157
commit
f33c4b8000
3 changed files with 7 additions and 3 deletions
|
@ -953,7 +953,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
}
|
||||
}
|
||||
|
||||
private void displayMissedChats(final int missedChatCount) {
|
||||
public void displayMissedChats(final int missedChatCount) {
|
||||
if (missedChatCount > 0) {
|
||||
missedChats.setText(missedChatCount + "");
|
||||
missedChats.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -29,6 +29,7 @@ import android.os.Bundle;
|
|||
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.LinphoneService;
|
||||
import org.linphone.activities.LinphoneActivity;
|
||||
import org.linphone.compatibility.Compatibility;
|
||||
import org.linphone.core.Address;
|
||||
import org.linphone.core.Call;
|
||||
|
@ -60,6 +61,9 @@ public class NotificationBroadcastReceiver extends BroadcastReceiver {
|
|||
if (room == null) return;
|
||||
|
||||
room.markAsRead();
|
||||
if (LinphoneActivity.isInstanciated()) {
|
||||
LinphoneActivity.instance().displayMissedChats(LinphoneManager.getInstance().getUnreadMessageCount());
|
||||
}
|
||||
ChatMessage msg = room.createMessage(reply);
|
||||
msg.send();
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
android:src="@drawable/arrow_hangup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.2"/>
|
||||
android:alpha="0.4"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -163,7 +163,7 @@
|
|||
android:src="@drawable/arrow_accept"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.2"/>
|
||||
android:alpha="0.4"/>
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/arrow_accept"
|
||||
|
|
Loading…
Reference in a new issue