Dual SIM fixes an Improvement :

Fix SIM ID in message view
    Add SIM name in message view
    Improve layout

Signed-off-by: ewft <bnj@ewft.org>
This commit is contained in:
ewft
2020-02-09 15:43:53 +01:00
committed by Moez Bhatti
parent 5512b344d6
commit 13509d0d66
2 changed files with 7 additions and 2 deletions
@@ -226,7 +226,12 @@ class MessagesAdapter @Inject constructor(
val simIndex = subs.takeIf { it.size > 1 }?.indexOfFirst { it.subscriptionId == message.subId } ?: -1
holder.timestamp.text = dateFormatter.getMessageTimestamp(message.date)
holder.simIndex.text = "${simIndex + 1}"
if (simIndex != -1){
holder.simIndex.text = "${subs[simIndex].simSlotIndex + 1} - " + subs[simIndex].displayName
} else {
holder.simIndex.text = "${simIndex + 1}"
}
holder.timestamp.setVisible(timeSincePrevious >= BubbleUtils.TIMESTAMP_THRESHOLD
|| message.subId != previous?.subId && simIndex != -1)
@@ -264,7 +264,7 @@
android:tint="?android:attr/textColorSecondary"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
app:layout_constraintEnd_toStartOf="@id/send" />
app:layout_constraintEnd_toEndOf="@id/messageBackground" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/simIndex"