Skip to content

Commit b239857

Browse files
committed
Added Bonk, Ethereum Name Service, Pepe, and Render tokens.
Added a "Never" setting to update intervals.
1 parent 4c5679f commit b239857

File tree

16 files changed

+33
-26
lines changed

16 files changed

+33
-26
lines changed

.idea/kotlinc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bitcoin/build.gradle

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
id 'kotlin-android'
44
id 'com.google.devtools.ksp'
55
id 'org.jetbrains.kotlin.android'
6-
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22'
6+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.24'
77
}
88

99
android {
@@ -13,8 +13,8 @@ android {
1313
applicationId "com.brentpanther.bitcoinwidget"
1414
minSdk 23
1515
targetSdk 34
16-
versionCode 329
17-
versionName "8.5.4"
16+
versionCode 330
17+
versionName "8.5.5"
1818

1919
}
2020

@@ -62,23 +62,23 @@ ksp {
6262
}
6363

6464
dependencies {
65-
implementation platform('androidx.compose:compose-bom:2024.01.00')
65+
implementation platform('androidx.compose:compose-bom:2024.06.00')
6666

67-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
68-
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2'
67+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1'
68+
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3'
6969
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
7070
implementation 'androidx.preference:preference-ktx:1.2.1'
7171
implementation 'androidx.work:work-runtime:2.9.0'
72-
implementation 'androidx.activity:activity-ktx:1.8.2'
73-
implementation 'androidx.activity:activity-compose:1.8.2'
72+
implementation 'androidx.activity:activity-ktx:1.9.0'
73+
implementation 'androidx.activity:activity-compose:1.9.0'
7474
implementation "androidx.compose.ui:ui"
7575
implementation "androidx.compose.ui:ui-tooling-preview"
7676
implementation 'androidx.compose.material:material'
77-
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0'
78-
implementation 'androidx.navigation:navigation-compose:2.7.6'
77+
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.8.3'
78+
implementation 'androidx.navigation:navigation-compose:2.7.7'
7979
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
80-
implementation 'io.coil-kt:coil-compose:2.5.0'
81-
implementation 'androidx.core:core-ktx:1.12.0'
80+
implementation 'io.coil-kt:coil-compose:2.6.0'
81+
implementation 'androidx.core:core-ktx:1.13.1'
8282
testImplementation 'junit:junit:4.13.2'
8383
testImplementation 'com.jayway.jsonpath:json-path:2.9.0'
8484
debugImplementation "androidx.compose.ui:ui-tooling"

bitcoin/src/main/java/com/brentpanther/bitcoinwidget/Coin.kt

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ enum class Coin(val coinName: String, val coinGeckoId: String, private vararg va
3333
BNB("Binance Coin", "binancecoin", IconTheme(SOLID, ic_bnb)),
3434
BEST("Bitpanda Ecosystem Token", "bitpanda-ecosystem-token", IconTheme(SOLID, ic_best)),
3535
BNT("Bancor Network Token", "bancor", IconTheme(SOLID, ic_bnt)),
36+
BONK("Bonk", "bonk", IconTheme(SOLID, ic_bonk)),
3637
BSV("Bitcoin SV", "bitcoin-cash-sv", IconTheme(SOLID, ic_bsv, ic_bsv_dark)),
3738
BTC("Bitcoin", "bitcoin", IconTheme(SOLID, ic_btc, ic_btc_dark)) {
3839
override fun getUnits() =
@@ -56,6 +57,7 @@ enum class Coin(val coinName: String, val coinGeckoId: String, private vararg va
5657
DYDX("dYdX", "dydx-chain", IconTheme(SOLID, ic_dydx)),
5758
EGLD("Elrond", "elrond-erd-2", IconTheme(SOLID, ic_egld_dark, ic_egld_white)),
5859
ENJ("Enjin Coin", "enjincoin", IconTheme(SOLID, ic_enj)),
60+
ENS("Ethereum Name Service", "ethereum-name-service", IconTheme(SOLID, ic_ens)),
5961
EOS("EOS", "eos", IconTheme(SOLID, ic_eos_black, ic_eos_white), IconTheme(TRANSPARENT, ic_eos_white)),
6062
ETC("Ethereum Classic", "ethereum-classic", IconTheme(SOLID, ic_etc)),
6163
ETH("Ethereum", "ethereum", IconTheme(SOLID, ic_eth)),
@@ -112,13 +114,15 @@ enum class Coin(val coinName: String, val coinGeckoId: String, private vararg va
112114
PAN("Pantos", "pantos", IconTheme(SOLID, ic_pan)),
113115
PAX("Paxos Standard", "paxos-standard", IconTheme(SOLID, ic_pax)),
114116
PAXG("PAX Gold", "pax-gold", IconTheme(SOLID, ic_paxg_color)),
117+
PEPE("Pepe", "pepe", IconTheme(SOLID, ic_pepe)),
115118
POWR("Power Ledger", "power-ledger", IconTheme(SOLID, ic_powr_color)),
116119
PPC("Peercoin", "peercoin", IconTheme(SOLID, ic_ppc)),
117120
QNT("Quant", "quant-network", IconTheme(SOLID, ic_qnt)),
118121
QTUM("Qtum", "qtum", IconTheme(SOLID, ic_qtum)),
119122
RDD("Reddcoin", "reddcoin", IconTheme(SOLID, ic_rdd)),
120123
REN("REN", "republic-protocol", IconTheme(SOLID, ic_ren)),
121124
REP("Augur", "augur", IconTheme(SOLID, ic_rep)),
125+
RNDR("Render", "render-token", IconTheme(SOLID, ic_rndr)),
122126
RPL("Rocket Pool", "rocket-pool", IconTheme(SOLID, ic_rpl)),
123127
RUNE("THORChain", "thorchain", IconTheme(SOLID, ic_rune)),
124128
RVN("Ravencoin", "ravencoin", IconTheme(SOLID, ic_rvn)),

bitcoin/src/main/java/com/brentpanther/bitcoinwidget/WidgetProvider.kt

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ open class WidgetProvider : AppWidgetProvider() {
7979
workManager.cancelAllWorkByTag(WORKNAME)
8080
}
8181
when (refresh) {
82+
0 -> workManager.cancelAllWorkByTag(WORKNAME)
8283
5 -> (5..15 step 5).forEachIndexed { i, it -> scheduleWork(workManager, 15, it, i) }
8384
10 -> (10..20 step 10).forEachIndexed { i, it -> scheduleWork(workManager, 20, it, i) }
8485
else -> scheduleWork(workManager, refresh, refresh, 0)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
package com.brentpanther.bitcoinwidget.exchange
22

3-
class RateLimitedException : Exception() {
4-
}
3+
class RateLimitedException : Exception()

bitcoin/src/main/java/com/brentpanther/bitcoinwidget/ui/selection/CoinSelectionScreen.kt

-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import androidx.compose.runtime.remember
4444
import androidx.compose.runtime.rememberCoroutineScope
4545
import androidx.compose.runtime.setValue
4646
import androidx.compose.ui.Alignment
47-
import androidx.compose.ui.ExperimentalComposeUiApi
4847
import androidx.compose.ui.Modifier
4948
import androidx.compose.ui.input.key.onPreviewKeyEvent
5049
import androidx.compose.ui.platform.LocalContext
@@ -66,7 +65,6 @@ import com.brentpanther.bitcoinwidget.ui.theme.HighlightRippleTheme
6665
import kotlinx.coroutines.flow.collectLatest
6766
import kotlinx.coroutines.launch
6867

69-
@OptIn(ExperimentalComposeUiApi::class)
7068
@Composable
7169
fun CoinSelectionScreen(
7270
navController: NavController, widgetId: Int,
Loading
9.27 KB
Loading
10.6 KB
Loading
4.65 KB
Loading

bitcoin/src/main/res/raw/cryptowidgetcoins_v2.json

+1-1
Large diffs are not rendered by default.

bitcoin/src/main/res/values-pt-rBR/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<item>1 hora</item>
5353
<item>2 horas</item>
5454
<item>6 horas</item>
55+
<item>Nunca</item>
5556
</string-array>
5657
<string-array name="symbols">
5758
<item>Mostrar símbolo local</item>

bitcoin/src/main/res/values/strings.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
<item>1 hour</item>
7575
<item>2 hours</item>
7676
<item>6 hours</item>
77+
<item>Never</item>
7778
</string-array>
7879
<string-array name="intervalValues">
7980
<item>5</item>
@@ -83,6 +84,7 @@
8384
<item>60</item>
8485
<item>120</item>
8586
<item>360</item>
87+
<item>0</item>
8688
</string-array>
8789
<string-array name="symbols">
8890
<item>Show local symbol</item>
@@ -94,7 +96,7 @@
9496
<item>ISO</item>
9597
<item>NONE</item>
9698
</string-array>
97-
<string name="json_last_modified" translatable="false">Thu, 01 Feb 2024 20:47:37 GMT</string>
99+
<string name="json_last_modified" translatable="false">Sat, 06 Jul 2024 15:54:48 GMT</string>
98100
<string name="json_url" translatable="false">https://www.brentpanther.com/cryptowidgetcoins_v2.json</string>
99101

100102
<string name="error_restricted_battery_saver">Unable to refresh, Battery Saver is on</string>

build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.compose_compiler_version = '1.5.8'
4+
ext.compose_compiler_version = '1.5.14'
55

6-
ext.kotlin_version = '1.9.22'
6+
ext.kotlin_version = '1.9.24'
77
repositories {
88
google()
99
mavenCentral()
1010
gradlePluginPortal()
1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:8.2.2'
14-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"
13+
classpath 'com.android.tools.build:gradle:8.5.0'
14+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24"
1515

1616
// NOTE: Do not place your application dependencies here; they belong
1717
// in the individual module build.gradle files
1818
}
1919
}
2020

2121
plugins {
22-
id 'com.google.devtools.ksp' version '1.9.22-1.0.16' apply false
23-
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22'
22+
id 'com.google.devtools.ksp' version '1.9.24-1.0.20' apply false
23+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.24'
2424
}
2525

2626
allprojects {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Added Bonk, Ethereum Name Service, Pepe, and Render tokens.
2+
Added a "Never" setting to update intervals.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)