Skip to content

Commit

Permalink
Revert "Release/1.18.5 (#1536)"
Browse files Browse the repository at this point in the history
This reverts commit 8c4bd9b.
  • Loading branch information
ThomasSession authored Jul 9, 2024
1 parent 8c4bd9b commit ad0b1a9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
}

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/xml/network_security_configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ad0b1a9

Please sign in to comment.