Skip to content

Commit

Permalink
mobile_mainnet_7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisDemyanko committed Jun 14, 2022
1 parent 5479f77 commit eff8979
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ android {
applicationId "com.mw.beam.beamwallet"
minSdkVersion 23
targetSdkVersion 32
versionCode 453
versionCode 500
versionName "7.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
android:launchMode="singleTask"
android:usesCleartextTraffic="true"
android:screenOrientation="portrait"
android:theme="@style/SplashTheme">
android:theme="@style/SplashTheme"
android:exported="true">

<meta-data
android:name="android.app.shortcuts"
Expand Down Expand Up @@ -51,7 +52,8 @@
android:name=".screens.app_activity.AppActivity"
android:hardwareAccelerated="true"
android:launchMode="singleTask"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand All @@ -61,6 +63,7 @@
</activity>

<activity
android:exported="false"
android:name=".screens.qr.ScanQrActivity"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
Expand All @@ -84,6 +87,7 @@
</provider>

<service
android:exported="false"
android:name=".service.BackgroundService"
android:permission="android.permission.BIND_JOB_SERVICE" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,12 @@ class TxDescription(val source: TxDescriptionDTO) : Parcelable {
if(isPublicOffline || isShielded) {
return when (this.status) {
TxStatus.Cancelled -> ContextCompat.getDrawable(App.self, R.drawable.ic_send_canceled_offline)
TxStatus.Failed -> ContextCompat.getDrawable(App.self, R.drawable.ic_send_failed_offline)
TxStatus.Failed -> {
when (failureReason) {
TxFailureReason.TRANSACTION_EXPIRED -> ContextCompat.getDrawable(App.self, R.drawable.ic_expired)
else -> ContextCompat.getDrawable(App.self, R.drawable.ic_send_failed_offline)
}
}
TxStatus.Completed, TxStatus.Confirming -> if (selfTx) {
ContextCompat.getDrawable(App.self, R.drawable.ic_sent_own_offline)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ class UtxoPresenter(currentView: UtxoContract.View, currentRepository: UtxoContr
override fun initSubscriptions() {
super.initSubscriptions()

if(AppManager.instance.isRestored) {
AppManager.instance.requestUTXO()
}
AppManager.instance.requestUTXO()


filter()

Expand All @@ -100,9 +99,7 @@ class UtxoPresenter(currentView: UtxoContract.View, currentRepository: UtxoContr
}

txStatusSubscription = AppManager.instance.subOnTransactionsChanged.subscribe() {
if (utxosCount > 0) {
filter()
}
filter()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,16 @@ class UtxosAdapter(private val context: Context, private val clickListener: OnIt
private var data: List<Utxo> = listOf()

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ViewHolder(LayoutInflater.from(context).inflate(R.layout.item_utxo, parent, false)).apply {
this.containerView.setOnClickListener {
clickListener.onItemClick(data[adapterPosition])
}
this.setIsRecyclable(false)
}

@SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.setIsRecyclable(false)

val utxo = data[position]

holder.containerView.setOnClickListener {
clickListener.onItemClick(data[position])
}
holder.apply {
statusLabel.setTextColor(when (utxo.status) {
UtxoStatus.Available -> accentColor
Expand Down

0 comments on commit eff8979

Please sign in to comment.