Skip to content

Commit 859daa2

Browse files
committed
1.0.10
1 parent 3a1b318 commit 859daa2

27 files changed

+472
-19
lines changed

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle.kts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ plugins {
66
id("com.google.gms.google-services")
77
}
88

9+
sentry {
10+
autoUploadProguardMapping
11+
autoUploadNativeSymbols
12+
autoUploadSourceContext
13+
}
14+
915
android {
1016
namespace = "com.troplo.privateuploader"
1117
compileSdk = 34
@@ -14,8 +20,8 @@ android {
1420
applicationId = "com.troplo.privateuploader"
1521
minSdk = 28
1622
targetSdk = 34
17-
versionCode = 8
18-
versionName = "1.0.8"
23+
versionCode = 10
24+
versionName = "1.0.10"
1925
multiDexEnabled = true
2026
buildConfigField("String", "SERVER_URL", "\"https://privateuploader.com\"")
2127
buildConfigField("String", "BUILD_TIME", "\"${System.currentTimeMillis()}\"")
@@ -29,7 +35,8 @@ android {
2935

3036
buildTypes {
3137
release {
32-
isMinifyEnabled = false
38+
isMinifyEnabled = true
39+
isShrinkResources = true
3340
buildConfigField("String", "SERVER_URL", "\"https://privateuploader.com\"")
3441
proguardFiles(
3542
getDefaultProguardFile("proguard-android-optimize.txt"),
@@ -95,15 +102,15 @@ dependencies {
95102
implementation("io.coil-kt:coil:2.3.0")
96103
implementation("com.github.jeziellago:compose-markdown:0.3.3")
97104
implementation("com.github.bumptech.glide:compose:1.0.0-alpha.1")
98-
implementation("com.squareup.retrofit2:retrofit:2.9.0")
99-
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")
105+
implementation("com.squareup.retrofit2:retrofit:2.10.0-SNAPSHOT")
106+
implementation("com.squareup.retrofit2:converter-moshi:2.10.0-SNAPSHOT")
100107
implementation("com.squareup.moshi:moshi:1.12.0")
101108
implementation("com.squareup.moshi:moshi-kotlin:1.12.0")
102109
implementation("com.github.bumptech.glide:glide:4.16.0-SNAPSHOT")
103110
implementation("com.squareup.okhttp3:logging-interceptor:4.9.1")
104111
implementation("androidx.core:core-ktx:1.10.1")
105112
implementation("com.google.code.gson:gson:2.10.1")
106-
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
113+
implementation("com.squareup.retrofit2:converter-gson:2.10.0-SNAPSHOT")
107114
implementation("io.socket:socket.io-client:2.1.0") {
108115
exclude("org.json", "json")
109116
}

app/proguard-rules.pro

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,25 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile
22+
-dontwarn kotlinx.serialization.DeserializationStrategy
23+
-dontwarn kotlinx.serialization.KSerializer
24+
-dontwarn kotlinx.serialization.Serializable
25+
-dontwarn kotlinx.serialization.builtins.BuiltinSerializersKt
26+
-dontwarn kotlinx.serialization.internal.ArrayListSerializer
27+
-dontwarn kotlinx.serialization.internal.GeneratedSerializer
28+
-dontwarn kotlinx.serialization.internal.PluginGeneratedSerialDescriptor
29+
-dontwarn kotlinx.serialization.internal.StringSerializer
30+
-dontwarn kotlinx.serialization.json.Json
31+
-dontwarn kotlinx.serialization.json.JsonBuilder
32+
-dontwarn kotlinx.serialization.json.JsonKt
33+
-dontwarn kotlinx.serialization.json.JvmStreamsKt
34+
-keepclassmembers,allowobfuscation class * {
35+
@com.google.gson.annotations.SerializedName <fields>;
36+
}
37+
38+
-keep class * {
39+
@com.google.gson.annotations.SerializedName <fields>;
40+
}
41+
-keepnames class com.fasterxml.jackson.databind.** { *; }
42+
-dontwarn com.fasterxml.jackson.databind.**

app/src/main/java/com/troplo/privateuploader/api/Functions.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,25 @@ import kotlin.math.ln
2222
import kotlin.math.pow
2323

2424
object TpuFunctions {
25-
fun image(link: String?, recipient: User?): String? {
25+
fun image(link: String?, recipient: User?, width: Int? = null, height: Int? = null): String? {
2626
if (recipient?.avatar != null) {
27-
return "https://i.troplo.com/i/${recipient.avatar}"
27+
var string = "https://i.troplo.com/i/${recipient.avatar}"
28+
if (width != null && height != null) {
29+
string += "?width=$width&height=$height"
30+
}
31+
return string
2832
}
2933
if (link == null) {
3034
return null
3135
}
3236
return if (link.length >= 20) {
3337
"https://colubrina.troplo.com/usercontent/$link"
3438
} else {
35-
"https://i.troplo.com/i/$link"
39+
var string = "https://i.troplo.com/i/$link"
40+
if (width != null && height != null) {
41+
string += "?width=$width&height=$height"
42+
}
43+
return string
3644
}
3745
}
3846

app/src/main/java/com/troplo/privateuploader/api/ImageLoader.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import coil.decode.GifDecoder
77
import coil.decode.ImageDecoderDecoder
88
import coil.disk.DiskCache
99
import kotlinx.coroutines.Dispatchers
10+
import kotlinx.coroutines.newFixedThreadPoolContext
1011

12+
val dispatcher = newFixedThreadPoolContext(2, "CoilDispatcherTPU")
1113
fun imageLoader(context: Context, cache: Boolean? = true): ImageLoader {
1214
return ImageLoader.Builder(context)
1315
.components {
@@ -17,7 +19,7 @@ fun imageLoader(context: Context, cache: Boolean? = true): ImageLoader {
1719
add(GifDecoder.Factory())
1820
}
1921
}
20-
.dispatcher(Dispatchers.IO)
22+
.dispatcher(dispatcher)
2123
.diskCache {
2224
if (cache == true) {
2325
DiskCache.Builder()

app/src/main/java/com/troplo/privateuploader/components/chat/Embed.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.Spacer
1111
import androidx.compose.foundation.layout.fillMaxSize
1212
import androidx.compose.foundation.layout.fillMaxWidth
1313
import androidx.compose.foundation.layout.height
14+
import androidx.compose.foundation.layout.heightIn
1415
import androidx.compose.foundation.layout.padding
1516
import androidx.compose.foundation.layout.size
1617
import androidx.compose.foundation.layout.width
@@ -147,7 +148,9 @@ fun Embed(embed: Embed) {
147148
}
148149

149150
else -> {
150-
Card {
151+
Card(
152+
modifier = Modifier.width(300.dp).heightIn(0.dp, 200.dp)
153+
) {
151154
Text(
152155
text = "The version of TPUvNATIVE you are using does not yet support the embed type ${embed.type}!",
153156
modifier = Modifier.padding(16.dp)
@@ -157,7 +160,7 @@ fun Embed(embed: Embed) {
157160
}
158161
} else {
159162
Card(
160-
modifier = Modifier.width(300.dp)
163+
modifier = Modifier.width(300.dp).heightIn(0.dp, 200.dp)
161164
) {
162165
Box(
163166
modifier = Modifier.fillMaxSize(),

app/src/main/java/com/troplo/privateuploader/components/chat/MarkdownText.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import io.noties.markwon.linkify.LinkifyPlugin
3838

3939
@Composable
4040
fun MarkdownText(
41-
markdown: String,
41+
content: String,
4242
modifier: Modifier = Modifier,
4343
color: Color = Color.Unspecified,
4444
fontSize: TextUnit = TextUnit.Unspecified,
@@ -76,7 +76,7 @@ fun MarkdownText(
7676
)
7777
},
7878
update = { textView ->
79-
markdownRender.setMarkdown(textView, markdown)
79+
markdownRender.setMarkdown(textView, content)
8080
if (onTextLayout != null) {
8181
textView.post {
8282
onTextLayout(textView.lineCount)

0 commit comments

Comments
 (0)