Remove unnecessary variable
This commit is contained in:
parent
ad769040f4
commit
c7ec07ebde
1 changed files with 8 additions and 8 deletions
|
@ -51,7 +51,6 @@ class UserGpxInfoFragment : BaseDialogFragment() {
|
||||||
private lateinit var avgSpeedTv: TextView
|
private lateinit var avgSpeedTv: TextView
|
||||||
private lateinit var totalDistanceTv: TextView
|
private lateinit var totalDistanceTv: TextView
|
||||||
private lateinit var timeSpanTv: TextView
|
private lateinit var timeSpanTv: TextView
|
||||||
private var snackbar: Snackbar? = null
|
|
||||||
|
|
||||||
private var startCalendar = Calendar.getInstance()
|
private var startCalendar = Calendar.getInstance()
|
||||||
private var endCalendar = Calendar.getInstance()
|
private var endCalendar = Calendar.getInstance()
|
||||||
|
@ -106,10 +105,11 @@ class UserGpxInfoFragment : BaseDialogFragment() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
val backBtn = mainView.findViewById<ImageView>(R.id.back_button)
|
mainView.findViewById<ImageView>(R.id.back_button).apply {
|
||||||
backBtn.setImageDrawable(uiUtils.getThemedIcon(R.drawable.ic_arrow_back))
|
setImageDrawable(uiUtils.getThemedIcon(R.drawable.ic_arrow_back))
|
||||||
backBtn.setOnClickListener {
|
setOnClickListener {
|
||||||
dismiss()
|
dismiss()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dateStartBtn = mainView.findViewById<TextView>(R.id.date_start_btn)
|
dateStartBtn = mainView.findViewById<TextView>(R.id.date_start_btn)
|
||||||
|
@ -280,13 +280,13 @@ class UserGpxInfoFragment : BaseDialogFragment() {
|
||||||
} else if (!app.isConnectedOsmAndChosen()) {
|
} else if (!app.isConnectedOsmAndChosen()) {
|
||||||
fragmentManager?.also { ChooseOsmAndBottomSheet.showInstance(it, this) }
|
fragmentManager?.also { ChooseOsmAndBottomSheet.showInstance(it, this) }
|
||||||
} else if (!isOsmandCreateBitmap()) {
|
} else if (!isOsmandCreateBitmap()) {
|
||||||
snackbar = Snackbar.make(mainView, R.string.please_update_osmand, Snackbar.LENGTH_LONG).setAction(R.string.shared_string_update) {
|
val snackbar = Snackbar.make(mainView, R.string.please_update_osmand, Snackbar.LENGTH_LONG).setAction(R.string.shared_string_update) {
|
||||||
val packageName = if (app.settings.appToConnectPackage == OsmandAidlHelper.OSMAND_NIGHTLY_PACKAGE_NAME)
|
val packageName = if (app.settings.appToConnectPackage == OsmandAidlHelper.OSMAND_NIGHTLY_PACKAGE_NAME)
|
||||||
OsmandAidlHelper.OSMAND_FREE_PACKAGE_NAME else app.settings.appToConnectPackage
|
OsmandAidlHelper.OSMAND_FREE_PACKAGE_NAME else app.settings.appToConnectPackage
|
||||||
startActivity(AndroidUtils.getPlayMarketIntent(app, packageName))
|
startActivity(AndroidUtils.getPlayMarketIntent(app, packageName))
|
||||||
}
|
}
|
||||||
AndroidUtils.setSnackbarTextColor(snackbar!!, R.color.ctrl_active_dark)
|
AndroidUtils.setSnackbarTextColor(snackbar, R.color.ctrl_active_dark)
|
||||||
snackbar?.show()
|
snackbar.show()
|
||||||
} else {
|
} else {
|
||||||
saveCurrentGpxToFile(object :
|
saveCurrentGpxToFile(object :
|
||||||
OsmandLocationUtils.SaveGpxListener {
|
OsmandLocationUtils.SaveGpxListener {
|
||||||
|
|
Loading…
Reference in a new issue