Revert "Release/1.18.5 (#1536)"

This reverts commit 8c4bd9b44883fbc4ebfda8d707ddd8223a7e838f.
This commit is contained in:
ThomasSession 2024-07-09 14:07:25 +10:00 committed by GitHub
parent 8c4bd9b448
commit ad0b1a9db7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 17 deletions

View File

@ -31,8 +31,8 @@ configurations.all {
exclude module: "commons-logging"
}
def canonicalVersionCode = 374
def canonicalVersionName = "1.18.5"
def canonicalVersionCode = 373
def canonicalVersionName = "1.18.4"
def postFixSize = 10
def abiPostFix = ['armeabi-v7a' : 1,

View File

@ -18,7 +18,6 @@ import org.session.libsession.messaging.utilities.SodiumUtilities
import org.session.libsession.utilities.TextSecurePreferences
import org.session.libsession.utilities.ThemeUtil
import org.session.libsession.utilities.getColorFromAttr
import org.session.libsession.utilities.truncateIdForDisplay
import org.thoughtcrime.securesms.dependencies.DatabaseComponent
import org.thoughtcrime.securesms.util.RoundedBackgroundSpan
import org.thoughtcrime.securesms.util.getAccentColor
@ -68,7 +67,7 @@ object MentionUtilities {
} else {
val contact = DatabaseComponent.get(context).sessionContactDatabase().getContactWithSessionID(publicKey)
@Suppress("NAME_SHADOWING") val context = if (openGroup != null) Contact.ContactContext.OPEN_GROUP else Contact.ContactContext.REGULAR
contact?.displayName(context) ?: truncateIdForDisplay(publicKey)
contact?.displayName(context)
}
if (userDisplayName != null) {
val mention = "@$userDisplayName"

View File

@ -1,6 +1,7 @@
package org.thoughtcrime.securesms.util
import android.content.Context
import android.content.res.Resources
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.RectF
@ -49,17 +50,6 @@ class RoundedBackgroundSpan(
override fun getSize(
paint: Paint, text: CharSequence?, start: Int, end: Int, fm: Paint.FontMetricsInt?
): Int {
// If the span covers the whole text, and the height is not set, draw() will not be called for the span.
// To help with that we need to take the font metric into account
val metrics = paint.fontMetricsInt
if (fm != null) {
fm.top = metrics.top
fm.ascent = metrics.ascent
fm.descent = metrics.descent
fm.bottom = metrics.bottom
}
return (paint.measureText(text, start, end) + 2 * paddingHorizontal).toInt()
}

View File

@ -2,7 +2,6 @@
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">127.0.0.1</domain>
<domain includeSubdomains="true">public.loki.foundation</domain>
</domain-config>
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="false">seed1.getsession.org</domain>

View File

@ -1,4 +1,4 @@
package org.session.libsession.utilities
fun truncateIdForDisplay(id: String): String =
id.takeIf { it.length > 8 }?.run{ "${take(4)}${takeLast(4)}" } ?: id
id.takeIf { it.length > 8 }?.apply{ "${take(4)}${takeLast(4)}" } ?: id