Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Pygmalion69 committed Apr 14, 2024
1 parent 70b78b2 commit fe2f086
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 19 deletions.
4 changes: 0 additions & 4 deletions app/src/main/java/org/nitri/opentopo/GpxDetailFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,6 @@ class GpxDetailFragment : Fragment(), WayPointListAdapter.OnItemClickListener,
}
}

override fun onDetach() {
super.onDetach()
}

interface OnFragmentInteractionListener {
/**
* Retrieve the current GPX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import android.app.Dialog
import android.content.DialogInterface
import android.location.Location
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.Window
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
Expand Down Expand Up @@ -55,8 +53,4 @@ class LocationDetailFragment : DialogFragment() {
locationViewModel.currentNmea.observe(requireActivity(), nmeaObserver)
}

@SuppressLint("DefaultLocale")
private fun bindView() {

}
}
3 changes: 0 additions & 3 deletions app/src/main/java/org/nitri/opentopo/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.text.TextUtils
import android.text.method.LinkMovementMethod
import android.util.Log
import android.view.MenuItem
import android.view.MotionEvent
import android.widget.TextView
import android.widget.Toast
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.appcompat.app.ActionBar
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
import androidx.core.view.WindowCompat
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/nitri/opentopo/MapFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider
import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay
import java.io.File

class MapFragment() : Fragment(), LocationListener, PopupMenu.OnMenuItemClickListener,
class MapFragment : Fragment(), LocationListener, PopupMenu.OnMenuItemClickListener,
GestureCallback {
private lateinit var mMapView: MapView
private var mLocationOverlay: MyLocationNewOverlay? = null
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/org/nitri/opentopo/Util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import android.util.TypedValue
import androidx.annotation.AttrRes
import androidx.annotation.ColorInt
import androidx.annotation.DrawableRes
import androidx.annotation.NonNull
import androidx.appcompat.content.res.AppCompatResources
import androidx.core.content.ContextCompat
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class NearbyFragment : Fragment(), NearbyAdapter.OnItemClickListener {
mNearbyAdapter = NearbyAdapter(mNearbyItems, this)
mNearbyAdapter!!.setHasStableIds(true)
val api = retrofit.create(MediaWikiApi::class.java)
val nearbyDatabase = getDatabase(requireActivity()) ?: return
val nearbyDatabase = getDatabase(requireActivity())
val dao = nearbyDatabase.nearbyDao()
val nearbyRepository = NearbyRepository(dao, api, mLatitude, mLongitude)
val factory = NearbyViewModelFactory(nearbyRepository)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.nitri.opentopo.nearby.api

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.Room.databaseBuilder
import androidx.room.RoomDatabase
import org.nitri.opentopo.nearby.da.NearbyDao
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.nitri.opentopo.nearby.da

import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.osmdroid.views.overlay.Overlay
import kotlin.math.pow
import kotlin.math.sqrt

class TestOverlay(var mContext: Context) : Overlay() {
class TestOverlay(private var mContext: Context) : Overlay() {
override fun draw(canvas: Canvas, osmv: MapView, shadow: Boolean) {
val routePaint = Paint()
routePaint.color = ContextCompat.getColor(mContext, R.color.colorTrack)
Expand Down

0 comments on commit fe2f086

Please sign in to comment.