Skip to content

Commit d370d54

Browse files
authored
Apply changes from 2.0.2 release (#134)
* Portfolio grammar fixes * Use portfolio dialog instead of group dialog * EditAsset: show keyboard on screen open * Place cursor at end on focus * Merge multiple instances of same asset in one portfolio * Fix release app name and icon * fix: AddAssetViewModel onAssetValueChange bug * Replace downloadable fonts with font files * Add AD_ID permission * 2.0.2 * Fixing release workflow * Fix portfolio asset add snackbar
1 parent b167cc6 commit d370d54

37 files changed

+505
-133
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
distribution: 'adopt'
2222

2323
- name: Validate Gradle wrapper
24-
uses: gradle/actions/wrapper-validation@3
24+
uses: gradle/actions/wrapper-validation@v3
2525

2626
- name: Decrypt the keystore for signing
2727
run: |

app/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ android {
1616
applicationId = "dev.arkbuilders.rate"
1717
minSdk = libs.versions.minSdk.get().toInt()
1818
targetSdk = libs.versions.compileSdk.get().toInt()
19-
versionCode = 3
20-
versionName = "1.2.0"
19+
versionCode = 6
20+
versionName = "2.0.2"
2121
setProperty("archivesBaseName", "ark-rate")
2222

2323
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -61,8 +61,8 @@ android {
6161

6262
addManifestPlaceholders(
6363
mapOf(
64-
"appIcon" to "@mipmap/ic_launcher_debug",
65-
"appLabel" to "@string/app_name_debug",
64+
"appIcon" to "@mipmap/ic_launcher",
65+
"appLabel" to "@string/app_name",
6666
),
6767
)
6868
}

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
66
<uses-permission android:name="android.permission.INTERNET" />
7-
87
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
8+
9+
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
910

1011
<application
1112
android:name=".presentation.App"
@@ -53,9 +54,6 @@
5354
tools:node="remove" />
5455
</provider>
5556

56-
<meta-data
57-
android:name="preloaded_fonts"
58-
android:resource="@array/preloaded_fonts" />
5957
<meta-data
6058
android:name="firebase_crashlytics_collection_enabled"
6159
android:value="false" />

core/db/src/main/java/dev/arkbuilders/rate/core/db/dao/PortfolioDao.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import androidx.room.OnConflictStrategy
66
import androidx.room.Query
77
import androidx.room.Upsert
88
import dev.arkbuilders.rate.core.db.entity.RoomAsset
9+
import dev.arkbuilders.rate.core.domain.model.CurrencyCode
910
import kotlinx.coroutines.flow.Flow
1011

1112
@Dao
@@ -22,6 +23,9 @@ interface PortfolioDao {
2223
@Query("SELECT * FROM RoomAsset WHERE id = :id")
2324
suspend fun getById(id: Long): RoomAsset?
2425

26+
@Query("SELECT * FROM RoomAsset WHERE code = :code")
27+
suspend fun getAllByCode(code: CurrencyCode): List<RoomAsset>
28+
2529
@Query("SELECT * FROM RoomAsset")
2630
fun allFlow(): Flow<List<RoomAsset>>
2731

core/presentation/src/main/java/dev/arkbuilders/rate/core/presentation/ui/ArkLargeTextField.kt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ import androidx.compose.foundation.text.BasicTextField
77
import androidx.compose.foundation.text.KeyboardOptions
88
import androidx.compose.material3.LocalTextStyle
99
import androidx.compose.runtime.Composable
10+
import androidx.compose.runtime.mutableStateOf
11+
import androidx.compose.runtime.remember
1012
import androidx.compose.ui.Modifier
13+
import androidx.compose.ui.text.TextRange
1114
import androidx.compose.ui.text.font.FontWeight
1215
import androidx.compose.ui.text.input.KeyboardType
16+
import androidx.compose.ui.text.input.TextFieldValue
1317
import androidx.compose.ui.unit.dp
1418
import androidx.compose.ui.unit.sp
1519
import dev.arkbuilders.rate.core.presentation.theme.ArkColor
@@ -39,3 +43,41 @@ fun ArkLargeTextField(
3943
singleLine = true,
4044
)
4145
}
46+
47+
// Place cursor at end on focus
48+
@Composable
49+
fun ArkCursorLargeTextField(
50+
modifier: Modifier,
51+
value: String,
52+
onValueChange: (String) -> Unit,
53+
) {
54+
var currentTextFieldValue =
55+
remember {
56+
mutableStateOf<TextFieldValue?>(null)
57+
}
58+
BasicTextField(
59+
modifier =
60+
modifier
61+
.width(IntrinsicSize.Min)
62+
.defaultMinSize(minWidth = 10.dp),
63+
value =
64+
TextFieldValue(
65+
text = value,
66+
selection = currentTextFieldValue.value?.selection ?: TextRange(value.length),
67+
),
68+
onValueChange = {
69+
currentTextFieldValue.value = it
70+
onValueChange(it.text)
71+
},
72+
textStyle =
73+
LocalTextStyle.current.copy(
74+
fontSize = 36.sp,
75+
color = ArkColor.TextPrimary,
76+
fontWeight = FontWeight.SemiBold,
77+
),
78+
keyboardOptions =
79+
KeyboardOptions.Default
80+
.copy(keyboardType = KeyboardType.Number),
81+
singleLine = true,
82+
)
83+
}
296 KB
Binary file not shown.

core/presentation/src/main/res/font/inter.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.
303 KB
Binary file not shown.

core/presentation/src/main/res/font/inter_black.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.
302 KB
Binary file not shown.

0 commit comments

Comments
 (0)