Skip to content

Commit

Permalink
Added Bonk, Ethereum Name Service, Pepe, and Render tokens.
Browse files Browse the repository at this point in the history
Added a "Never" setting to update intervals.
  • Loading branch information
hwki committed Jul 6, 2024
1 parent 4c5679f commit b239857
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions bitcoin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'kotlin-android'
id 'com.google.devtools.ksp'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.24'
}

android {
Expand All @@ -13,8 +13,8 @@ android {
applicationId "com.brentpanther.bitcoinwidget"
minSdk 23
targetSdk 34
versionCode 329
versionName "8.5.4"
versionCode 330
versionName "8.5.5"

}

Expand Down Expand Up @@ -62,23 +62,23 @@ ksp {
}

dependencies {
implementation platform('androidx.compose:compose-bom:2024.01.00')
implementation platform('androidx.compose:compose-bom:2024.06.00')

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.work:work-runtime:2.9.0'
implementation 'androidx.activity:activity-ktx:1.8.2'
implementation 'androidx.activity:activity-compose:1.8.2'
implementation 'androidx.activity:activity-ktx:1.9.0'
implementation 'androidx.activity:activity-compose:1.9.0'
implementation "androidx.compose.ui:ui"
implementation "androidx.compose.ui:ui-tooling-preview"
implementation 'androidx.compose.material:material'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0'
implementation 'androidx.navigation:navigation-compose:2.7.6'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.8.3'
implementation 'androidx.navigation:navigation-compose:2.7.7'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'io.coil-kt:coil-compose:2.5.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'io.coil-kt:coil-compose:2.6.0'
implementation 'androidx.core:core-ktx:1.13.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.jayway.jsonpath:json-path:2.9.0'
debugImplementation "androidx.compose.ui:ui-tooling"
Expand Down
4 changes: 4 additions & 0 deletions bitcoin/src/main/java/com/brentpanther/bitcoinwidget/Coin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ enum class Coin(val coinName: String, val coinGeckoId: String, private vararg va
BNB("Binance Coin", "binancecoin", IconTheme(SOLID, ic_bnb)),
BEST("Bitpanda Ecosystem Token", "bitpanda-ecosystem-token", IconTheme(SOLID, ic_best)),
BNT("Bancor Network Token", "bancor", IconTheme(SOLID, ic_bnt)),
BONK("Bonk", "bonk", IconTheme(SOLID, ic_bonk)),
BSV("Bitcoin SV", "bitcoin-cash-sv", IconTheme(SOLID, ic_bsv, ic_bsv_dark)),
BTC("Bitcoin", "bitcoin", IconTheme(SOLID, ic_btc, ic_btc_dark)) {
override fun getUnits() =
Expand All @@ -56,6 +57,7 @@ enum class Coin(val coinName: String, val coinGeckoId: String, private vararg va
DYDX("dYdX", "dydx-chain", IconTheme(SOLID, ic_dydx)),
EGLD("Elrond", "elrond-erd-2", IconTheme(SOLID, ic_egld_dark, ic_egld_white)),
ENJ("Enjin Coin", "enjincoin", IconTheme(SOLID, ic_enj)),
ENS("Ethereum Name Service", "ethereum-name-service", IconTheme(SOLID, ic_ens)),
EOS("EOS", "eos", IconTheme(SOLID, ic_eos_black, ic_eos_white), IconTheme(TRANSPARENT, ic_eos_white)),
ETC("Ethereum Classic", "ethereum-classic", IconTheme(SOLID, ic_etc)),
ETH("Ethereum", "ethereum", IconTheme(SOLID, ic_eth)),
Expand Down Expand Up @@ -112,13 +114,15 @@ enum class Coin(val coinName: String, val coinGeckoId: String, private vararg va
PAN("Pantos", "pantos", IconTheme(SOLID, ic_pan)),
PAX("Paxos Standard", "paxos-standard", IconTheme(SOLID, ic_pax)),
PAXG("PAX Gold", "pax-gold", IconTheme(SOLID, ic_paxg_color)),
PEPE("Pepe", "pepe", IconTheme(SOLID, ic_pepe)),
POWR("Power Ledger", "power-ledger", IconTheme(SOLID, ic_powr_color)),
PPC("Peercoin", "peercoin", IconTheme(SOLID, ic_ppc)),
QNT("Quant", "quant-network", IconTheme(SOLID, ic_qnt)),
QTUM("Qtum", "qtum", IconTheme(SOLID, ic_qtum)),
RDD("Reddcoin", "reddcoin", IconTheme(SOLID, ic_rdd)),
REN("REN", "republic-protocol", IconTheme(SOLID, ic_ren)),
REP("Augur", "augur", IconTheme(SOLID, ic_rep)),
RNDR("Render", "render-token", IconTheme(SOLID, ic_rndr)),
RPL("Rocket Pool", "rocket-pool", IconTheme(SOLID, ic_rpl)),
RUNE("THORChain", "thorchain", IconTheme(SOLID, ic_rune)),
RVN("Ravencoin", "ravencoin", IconTheme(SOLID, ic_rvn)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ open class WidgetProvider : AppWidgetProvider() {
workManager.cancelAllWorkByTag(WORKNAME)
}
when (refresh) {
0 -> workManager.cancelAllWorkByTag(WORKNAME)
5 -> (5..15 step 5).forEachIndexed { i, it -> scheduleWork(workManager, 15, it, i) }
10 -> (10..20 step 10).forEachIndexed { i, it -> scheduleWork(workManager, 20, it, i) }
else -> scheduleWork(workManager, refresh, refresh, 0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
package com.brentpanther.bitcoinwidget.exchange

class RateLimitedException : Exception() {
}
class RateLimitedException : Exception()
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.key.onPreviewKeyEvent
import androidx.compose.ui.platform.LocalContext
Expand All @@ -66,7 +65,6 @@ import com.brentpanther.bitcoinwidget.ui.theme.HighlightRippleTheme
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch

@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun CoinSelectionScreen(
navController: NavController, widgetId: Int,
Expand Down
Binary file added bitcoin/src/main/res/drawable-nodpi/ic_bonk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bitcoin/src/main/res/drawable-nodpi/ic_ens.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bitcoin/src/main/res/drawable-nodpi/ic_pepe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bitcoin/src/main/res/drawable-nodpi/ic_rndr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion bitcoin/src/main/res/raw/cryptowidgetcoins_v2.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions bitcoin/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<item>1 hora</item>
<item>2 horas</item>
<item>6 horas</item>
<item>Nunca</item>
</string-array>
<string-array name="symbols">
<item>Mostrar símbolo local</item>
Expand Down
4 changes: 3 additions & 1 deletion bitcoin/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<item>1 hour</item>
<item>2 hours</item>
<item>6 hours</item>
<item>Never</item>
</string-array>
<string-array name="intervalValues">
<item>5</item>
Expand All @@ -83,6 +84,7 @@
<item>60</item>
<item>120</item>
<item>360</item>
<item>0</item>
</string-array>
<string-array name="symbols">
<item>Show local symbol</item>
Expand All @@ -94,7 +96,7 @@
<item>ISO</item>
<item>NONE</item>
</string-array>
<string name="json_last_modified" translatable="false">Thu, 01 Feb 2024 20:47:37 GMT</string>
<string name="json_last_modified" translatable="false">Sat, 06 Jul 2024 15:54:48 GMT</string>
<string name="json_url" translatable="false">https://www.brentpanther.com/cryptowidgetcoins_v2.json</string>

<string name="error_restricted_battery_saver">Unable to refresh, Battery Saver is on</string>
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.compose_compiler_version = '1.5.8'
ext.compose_compiler_version = '1.5.14'

ext.kotlin_version = '1.9.22'
ext.kotlin_version = '1.9.24'
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"
classpath 'com.android.tools.build:gradle:8.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24"

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

plugins {
id 'com.google.devtools.ksp' version '1.9.22-1.0.16' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22'
id 'com.google.devtools.ksp' version '1.9.24-1.0.20' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.24'
}

allprojects {
Expand Down
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/330.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added Bonk, Ethereum Name Service, Pepe, and Render tokens.
Added a "Never" setting to update intervals.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit b239857

Please sign in to comment.