Skip to content

Commit 8cc72d3

Browse files
committed
Remove unused code
1 parent 81ad402 commit 8cc72d3

3 files changed

Lines changed: 7 additions & 119 deletions

File tree

app/src/main/kotlin/org/btcmap/map/Marker.kt

Lines changed: 0 additions & 108 deletions
This file was deleted.

app/src/main/kotlin/org/btcmap/place/PlaceFragment.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import androidx.core.view.ViewCompat
2020
import androidx.core.view.WindowInsetsCompat
2121
import androidx.core.view.isVisible
2222
import androidx.core.view.updateLayoutParams
23+
import androidx.core.widget.TextViewCompat
2324
import androidx.fragment.app.Fragment
2425
import androidx.fragment.app.commit
2526
import androidx.fragment.app.replace
@@ -62,7 +63,8 @@ class PlaceFragment : Fragment() {
6263
binding.toolbar.setOnMenuItemClickListener {
6364
when (it.itemId) {
6465
R.id.directions -> {
65-
val place = db().place.selectById(placeId) ?: return@setOnMenuItemClickListener true
66+
val place =
67+
db().place.selectById(placeId) ?: return@setOnMenuItemClickListener true
6668
val uri = "geo:${place.lat},${place.lon}?q=${place.getLocalizedName()}".toUri()
6769
val intent = Intent(Intent.ACTION_VIEW, uri)
6870
requireContext().startActivity(Intent.createChooser(intent, null))
@@ -91,8 +93,10 @@ class PlaceFragment : Fragment() {
9193
binding.outdated.setTextColor(requireContext().getErrorColor())
9294

9395
binding.companionWarning.setTextColor(requireContext().getErrorColor())
94-
binding.companionWarning.compoundDrawableTintList =
95-
ColorStateList.valueOf(requireContext().getErrorColor())
96+
TextViewCompat.setCompoundDrawableTintList(
97+
binding.companionWarning,
98+
ColorStateList.valueOf(requireContext().getErrorColor()),
99+
)
96100

97101
commentsAdapter = CommentsAdapter()
98102
binding.commentsList.layoutManager = LinearLayoutManager(requireContext())

app/src/main/kotlin/org/btcmap/settings/SharedPreferencesExt.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,6 @@ var SharedPreferences.apiUrl: HttpUrl
262262
}
263263
}
264264

265-
fun SharedPreferences.apiUrlV4(vararg pathSegments: String): HttpUrl {
266-
val builder = apiUrl.newBuilder().addPathSegment("v4")
267-
pathSegments.forEach {
268-
builder.addPathSegment(it)
269-
}
270-
return builder.build()
271-
}
272-
273265
private const val KEY_BUTTON_BACKGROUND_COLOR = "buttonBackgroundColor"
274266

275267
fun SharedPreferences.buttonBackgroundColor(context: Context): Int {

0 commit comments

Comments
 (0)