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) {
|
if (missedChatCount > 0) {
|
||||||
missedChats.setText(missedChatCount + "");
|
missedChats.setText(missedChatCount + "");
|
||||||
missedChats.setVisibility(View.VISIBLE);
|
missedChats.setVisibility(View.VISIBLE);
|
||||||
|
|
|
@ -29,6 +29,7 @@ import android.os.Bundle;
|
||||||
|
|
||||||
import org.linphone.LinphoneManager;
|
import org.linphone.LinphoneManager;
|
||||||
import org.linphone.LinphoneService;
|
import org.linphone.LinphoneService;
|
||||||
|
import org.linphone.activities.LinphoneActivity;
|
||||||
import org.linphone.compatibility.Compatibility;
|
import org.linphone.compatibility.Compatibility;
|
||||||
import org.linphone.core.Address;
|
import org.linphone.core.Address;
|
||||||
import org.linphone.core.Call;
|
import org.linphone.core.Call;
|
||||||
|
@ -60,6 +61,9 @@ public class NotificationBroadcastReceiver extends BroadcastReceiver {
|
||||||
if (room == null) return;
|
if (room == null) return;
|
||||||
|
|
||||||
room.markAsRead();
|
room.markAsRead();
|
||||||
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
|
LinphoneActivity.instance().displayMissedChats(LinphoneManager.getInstance().getUnreadMessageCount());
|
||||||
|
}
|
||||||
ChatMessage msg = room.createMessage(reply);
|
ChatMessage msg = room.createMessage(reply);
|
||||||
msg.send();
|
msg.send();
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@
|
||||||
android:src="@drawable/arrow_hangup"
|
android:src="@drawable/arrow_hangup"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.2"/>
|
android:alpha="0.4"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
android:src="@drawable/arrow_accept"
|
android:src="@drawable/arrow_accept"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.2"/>
|
android:alpha="0.4"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:src="@drawable/arrow_accept"
|
android:src="@drawable/arrow_accept"
|
||||||
|
|
Loading…
Reference in a new issue