Replaced incorrect character in JNI

This commit is contained in:
Morgan Pretty
2023-06-01 15:56:58 +10:00
parent 3a035482e4
commit 6a4641bfce
4 changed files with 7 additions and 6 deletions

View File

@@ -564,7 +564,7 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
val admins = group.members.filter { it.value /*admin = true*/ }.keys.map { Address.fromSerialized(it) }
val groupId = GroupUtil.doubleEncodeGroupID(group.sessionId)
val title = group.name
val formationTimestamp = group.joinedAt
val formationTimestamp = (group.joinedAt * 1000L)
createGroup(groupId, title, members, null, null, admins, formationTimestamp)
setProfileSharing(Address.fromSerialized(groupId), true)
// Add the group to the user's set of public keys to poll for
@@ -836,7 +836,7 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
encPubKey = encryptionKeyPair.publicKey.serialize(),
encSecKey = encryptionKeyPair.privateKey.serialize(),
disappearingTimer = 0L,
joinedAt = formationTimestamp
joinedAt = (formationTimestamp / 1000L)
)
// shouldn't exist, don't use getOrConstruct + copy
userGroups.set(groupInfo)

View File

@@ -257,7 +257,7 @@ object ConfigurationMessageUtilities {
encPubKey = encryptionKeyPair.publicKey.serialize(),
encSecKey = encryptionKeyPair.privateKey.serialize(),
disappearingTimer = recipient.expireMessages.toLong(),
joinedAt = group.formationTimestamp
joinedAt = (group.formationTimestamp / 1000L)
)
}
(allOpenGroups + allLgc).forEach { groupInfo ->

View File

@@ -67,7 +67,8 @@ public class DateUtils extends android.text.format.DateUtils {
}
public static String getDisplayFormattedTimeSpanString(final Context c, final Locale locale, final long timestamp) {
if (isWithin(timestamp, 1, TimeUnit.MINUTES)) {
// If the timestamp is invalid (ie. 0) then assume we're waiting on data and just use the 'Now' copy
if (timestamp == 0 || isWithin(timestamp, 1, TimeUnit.MINUTES)) {
return c.getString(R.string.DateUtils_just_now);
} else if (isToday(timestamp)) {
return getFormattedDateTime(timestamp, getHourFormat(c), locale);