Skip to content

Commit

Permalink
Address more linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Apr 22, 2023
1 parent 5cd750f commit 0a23c58
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.kylecorry.andromeda.list.ListView
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.databinding.FragmentDiagnosticsBinding
import com.kylecorry.trail_sense.databinding.ListItemPlainIconBinding
import com.kylecorry.trail_sense.shared.CustomUiUtils
import com.kylecorry.trail_sense.shared.colors.AppColor
import com.kylecorry.trail_sense.shared.navigation.NavControllerAppNavigation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class PlaceBeaconFragment : BoundFragment<FragmentCreateBeaconBinding>() {
}

onMain {
beacon?.let { it ->
beacon?.let {
setEditingBeaconValues(it)
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
import com.kylecorry.andromeda.alerts.toast
import com.kylecorry.andromeda.core.system.Resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class AstronomySettingsFragment : AndromedaPreferenceFragment() {
val userPrefs = UserPreferences(requireContext())
prefs = userPrefs

list(R.string.pref_sunset_alert_time)?.setOnPreferenceClickListener { _ ->
context?.apply {
list(R.string.pref_sunset_alert_time)?.setOnPreferenceClickListener {
context?.apply {
SunsetAlarmReceiver.start(this)
}
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ import com.kylecorry.sol.units.*
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.astronomy.infrastructure.AstronomyPreferences
import com.kylecorry.trail_sense.navigation.infrastructure.NavigationPreferences
import com.kylecorry.trail_sense.settings.infrastructure.*
import com.kylecorry.trail_sense.shared.extensions.getDuration
import com.kylecorry.trail_sense.shared.extensions.putDuration
import com.kylecorry.trail_sense.settings.infrastructure.CellSignalPreferences
import com.kylecorry.trail_sense.settings.infrastructure.ClinometerPreferences
import com.kylecorry.trail_sense.settings.infrastructure.ErrorPreferences
import com.kylecorry.trail_sense.settings.infrastructure.FlashlightPreferenceRepo
import com.kylecorry.trail_sense.settings.infrastructure.IDeclinationPreferences
import com.kylecorry.trail_sense.settings.infrastructure.MetalDetectorPreferences
import com.kylecorry.trail_sense.settings.infrastructure.PackPreferences
import com.kylecorry.trail_sense.settings.infrastructure.PedometerPreferences
import com.kylecorry.trail_sense.settings.infrastructure.PowerPreferences
import com.kylecorry.trail_sense.settings.infrastructure.PrivacyPreferences
import com.kylecorry.trail_sense.settings.infrastructure.ThermometerPreferences
import com.kylecorry.trail_sense.settings.infrastructure.TidePreferences
import com.kylecorry.trail_sense.shared.preferences.PreferencesSubsystem
import com.kylecorry.trail_sense.shared.sharing.MapSite
import com.kylecorry.trail_sense.weather.infrastructure.WeatherPreferences
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ data class ActionItem(
val name: String,
val icon: Int,
val action: () -> Unit
) {
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.kylecorry.andromeda.core.toDoubleCompat
import com.kylecorry.andromeda.pickers.Pickers
import com.kylecorry.trail_sense.R

open class MultipartUnitInputView<Units : Enum<*>>(
class MultipartUnitInputView<Units : Enum<*>>(
context: Context,
attrs: AttributeSet? = null
) : FrameLayout(context, attrs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.kylecorry.andromeda.core.toDoubleCompat
import com.kylecorry.andromeda.pickers.Pickers
import com.kylecorry.trail_sense.R

open class UnitInputView<Units : Enum<*>>(
class UnitInputView<Units : Enum<*>>(
context: Context,
attrs: AttributeSet? = null
) : FrameLayout(context, attrs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import androidx.navigation.fragment.findNavController
import com.kylecorry.andromeda.alerts.CoroutineAlerts
import com.kylecorry.andromeda.core.system.Resources
import com.kylecorry.andromeda.core.time.Timer
import com.kylecorry.andromeda.core.ui.setCompoundDrawables
import com.kylecorry.andromeda.fragments.BoundFragment
import com.kylecorry.andromeda.fragments.inBackground
import com.kylecorry.sol.science.oceanography.Tide
import com.kylecorry.sol.science.oceanography.TideType
import com.kylecorry.sol.units.Distance
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.databinding.FragmentTideBinding
import com.kylecorry.trail_sense.shared.CustomUiUtils
import com.kylecorry.andromeda.core.ui.setCompoundDrawables
import com.kylecorry.trail_sense.shared.FormatService
import com.kylecorry.trail_sense.shared.UserPreferences
import com.kylecorry.andromeda.fragments.inBackground
import com.kylecorry.trail_sense.shared.extensions.onMain
import com.kylecorry.trail_sense.tools.tides.domain.TideService
import com.kylecorry.trail_sense.tools.tides.domain.TideTable
Expand Down Expand Up @@ -159,8 +159,6 @@ class TidesFragment : BoundFragment<FragmentTideBinding>() {
inBackground {
table = loadTideCommand.execute()
onMain {
if (!isBound) return@onMain

binding.loading.isVisible = false
if (table == null) {
val cancelled = CoroutineAlerts.dialog(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import com.kylecorry.andromeda.list.ListView
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.databinding.FragmentToolsBinding
import com.kylecorry.trail_sense.databinding.ListItemToolBinding
import com.kylecorry.trail_sense.shared.CustomUiUtils


class ToolsFragment : BoundFragment<FragmentToolsBinding>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import com.kylecorry.andromeda.core.toIntCompat
import com.kylecorry.andromeda.sense.Sensors
import com.kylecorry.trail_sense.R
import com.kylecorry.trail_sense.shared.QuickActionType
import com.kylecorry.trail_sense.shared.extensions.getDuration
import com.kylecorry.trail_sense.shared.extensions.putDuration
import com.kylecorry.trail_sense.shared.preferences.PreferencesSubsystem
import java.time.Duration
import java.time.LocalDate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ import com.kylecorry.sol.science.meteorology.PressureCharacteristic
import com.kylecorry.sol.science.meteorology.PressureTendency
import com.kylecorry.trail_sense.shared.alerts.IValueAlerter
import com.kylecorry.trail_sense.weather.domain.CurrentWeather
import com.kylecorry.trail_sense.weather.domain.RelativeArrivalTime
import com.kylecorry.trail_sense.weather.domain.WeatherPrediction
import com.kylecorry.trail_sense.weather.domain.forecasting.arrival.WeatherArrivalTime
import com.kylecorry.trail_sense.weather.infrastructure.IWeatherPreferences
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.mockito.kotlin.*
import java.time.*
import org.mockito.kotlin.any
import org.mockito.kotlin.mock
import org.mockito.kotlin.never
import org.mockito.kotlin.times
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever
import java.time.Instant
import java.time.LocalDate
import java.time.LocalTime
import java.time.ZoneId
import java.time.ZonedDateTime

internal class DailyWeatherAlertCommandTest {

Expand Down

0 comments on commit 0a23c58

Please sign in to comment.