cleanup and renames

This commit is contained in:
- 2025-01-03 14:10:11 +01:00
parent d3076748c3
commit eb2af0d0b1
26 changed files with 14 additions and 21 deletions

View File

@ -1,11 +1,7 @@
package net.mynero.wallet
import android.content.ComponentName
import android.content.Intent
import android.content.ServiceConnection
import android.graphics.Bitmap
import android.os.Bundle
import android.os.IBinder
import android.view.View
import android.widget.ImageButton
import android.widget.ImageView

View File

@ -304,7 +304,7 @@ class SendActivity : MoneroActivity() {
private fun addOutput(initial: Boolean, address: String? = null, amount: String? = null) {
val index = destCount
val entryView =
layoutInflater.inflate(R.layout.transaction_output_item, null) as ConstraintLayout
layoutInflater.inflate(R.layout.recycler_view_item_destination, null) as ConstraintLayout
val removeOutputImageButton =
entryView.findViewById<ImageButton>(R.id.remove_output_imagebutton)
val addressField = entryView.findViewById<EditText>(R.id.address_edittext)

View File

@ -27,7 +27,7 @@ class AccountAdapter(
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.context).inflate(R.layout.account_item, parent, false)
val view = LayoutInflater.from(parent.context).inflate(R.layout.recycler_view_item_account, parent, false)
return ViewHolder(listener, view, streetMode)
}

View File

@ -65,7 +65,7 @@ class EnotesAdapter(
override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(viewGroup.context)
.inflate(R.layout.enote_selection_item, viewGroup, false)
.inflate(R.layout.recycler_view_item_enote, viewGroup, false)
return ViewHolder(listener, view, streetMode)
}

View File

@ -51,7 +51,7 @@ class NodeSelectionAdapter(
}
override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(viewGroup.context).inflate(R.layout.node_selection_item, viewGroup, false)
val view = LayoutInflater.from(viewGroup.context).inflate(R.layout.recycler_view_item_node, viewGroup, false)
return ViewHolder(listener, view)
}

View File

@ -45,7 +45,7 @@ class SubaddressAdapter(
override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(viewGroup.context)
.inflate(R.layout.address_item, viewGroup, false)
.inflate(R.layout.recycler_view_item_address, viewGroup, false)
return ViewHolder(view, listener)
}

View File

@ -27,7 +27,6 @@ import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.DateHelper
import net.mynero.wallet.util.Helper
import net.mynero.wallet.util.ThemeHelper
import timber.log.Timber
import java.util.Calendar
import java.util.Date
@ -54,7 +53,7 @@ class TransactionInfoAdapter(
override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(viewGroup.context)
.inflate(R.layout.transaction_history_item, viewGroup, false)
.inflate(R.layout.recycler_view_item_transaction, viewGroup, false)
return ViewHolder(listener, view)
}

View File

@ -13,7 +13,7 @@ class WalletAdapter(
) : RecyclerView.Adapter<WalletAdapter.ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.context).inflate(R.layout.wallet_item, parent, false)
val view = LayoutInflater.from(parent.context).inflate(R.layout.recycler_view_item_wallet, parent, false)
return ViewHolder(listener, view)
}

View File

@ -32,7 +32,7 @@ class AddNodeBottomSheetDialog(val listener: AddNodeListener) : BottomSheetDialo
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.add_node_bottom_sheet_dialog, null)
return inflater.inflate(R.layout.bottom_sheet_dialog_add_node, null)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View File

@ -33,7 +33,7 @@ class EditNodeBottomSheetDialog(val listener: EditNodeListener, val node: Node)
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.edit_node_bottom_sheet_dialog, null)
return inflater.inflate(R.layout.bottom_sheet_dialog_edit_node, null)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View File

@ -28,7 +28,7 @@ class NodeSelectionBottomSheetDialog(
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.node_selection_bottom_sheet_dialog, null)
return inflater.inflate(R.layout.bottom_sheet_dialog_node_selection, null)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View File

@ -36,7 +36,7 @@ class WalletKeysBottomSheetDialog(
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.wallet_keys_bottom_sheet_dialog, container)
return inflater.inflate(R.layout.bottom_sheet_dialog_wallet_secrets, container)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View File

@ -227,8 +227,9 @@ class WalletService : Service(), WalletListener, DefaultLifecycleObserver {
}
private fun handleSetSubaddressLabel(index: Int, label: String) {
walletRef.get()!!.setSubaddressLabel(index, label)
walletRef.get()!!.store()
val wallet = getWalletOrThrow()
wallet.setSubaddressLabel(index, label)
wallet.store()
forEachObserver {
it.onSubaddressesUpdated()
}

View File

@ -9,7 +9,6 @@ object Constants {
const val MNEMONIC_LANGUAGE = "English"
const val STREET_MODE_BALANCE = "#.############"
const val PREF_USES_PROXY = "pref_uses_tor"
const val PREF_USE_PROXY = "pref_use_proxy"
const val PREF_PROXY = "pref_proxy"
const val PREF_NODE = "pref_node"
@ -25,8 +24,6 @@ object Constants {
const val NAV_ARG_TXINFO = "nav_arg_txinfo"
const val EXTRA_PREVENT_GOING_BACK = "prevent_going_back"
const val EXTRA_WALLET_PATH = "wallet_name"
const val EXTRA_WALLET_PASSWORD = "wallet_password"
const val EXTRA_SEND_ADDRESS = "send_address"
const val EXTRA_SEND_AMOUNT = "send_amount"
const val EXTRA_SEND_MAX = "send_max"