mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Updated gradle plugin and dependencies versions
This commit is contained in:
1 parent
0ca372b73f
commit
7191e02f99
19 files changed
+147
-113
No files matched your search
@@ -32,7 +32,7 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
composeOptions { kotlinCompilerExtensionVersion = "1.4.7" }
|
composeOptions { kotlinCompilerExtensionVersion = "1.5.1" }
|
||||||
packaging { resources { excludes += listOf("META-INF/{AL2.0,LGPL2.1}") } }
|
packaging { resources { excludes += listOf("META-INF/{AL2.0,LGPL2.1}") } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
package com.rtbishop.look4sat
|
package com.rtbishop.look4sat
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class MainApplication : Application() {
|
class MainApplication : Application() {
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ package com.rtbishop.look4sat.presentation
|
|||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.NavigationBar
|
||||||
|
import androidx.compose.material3.NavigationBarItem
|
||||||
|
import androidx.compose.material3.Scaffold
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
@@ -23,14 +26,13 @@ import com.rtbishop.look4sat.presentation.radar.RadarScreen
|
|||||||
import com.rtbishop.look4sat.presentation.settings.SettingsScreen
|
import com.rtbishop.look4sat.presentation.settings.SettingsScreen
|
||||||
|
|
||||||
sealed class Screen(var title: String, var icon: Int, var route: String) {
|
sealed class Screen(var title: String, var icon: Int, var route: String) {
|
||||||
object Entries : Screen("Entries", R.drawable.ic_entries, "entries")
|
data object Entries : Screen("Entries", R.drawable.ic_entries, "entries")
|
||||||
object Passes : Screen("Passes", R.drawable.ic_passes, "passes")
|
data object Passes : Screen("Passes", R.drawable.ic_passes, "passes")
|
||||||
object Radar : Screen("Radar", R.drawable.ic_radar, "radar")
|
data object Radar : Screen("Radar", R.drawable.ic_radar, "radar")
|
||||||
object Map : Screen("World Map", R.drawable.ic_world_map, "world_map")
|
data object Map : Screen("World Map", R.drawable.ic_world_map, "world_map")
|
||||||
object Settings : Screen("Settings", R.drawable.ic_settings, "settings")
|
data object Settings : Screen("Settings", R.drawable.ic_settings, "settings")
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MainScreen(navController: NavHostController = rememberNavController()) {
|
fun MainScreen(navController: NavHostController = rememberNavController()) {
|
||||||
Scaffold(bottomBar = { MainNavBar(navController = navController) }) { innerPadding ->
|
Scaffold(bottomBar = { MainNavBar(navController = navController) }) { innerPadding ->
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ import androidx.compose.foundation.layout.Arrangement
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.ElevatedCard
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.OutlinedTextField
|
||||||
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.saveable.rememberSaveable
|
import androidx.compose.runtime.saveable.rememberSaveable
|
||||||
@@ -38,17 +41,13 @@ private fun FilterDialogPreview() {
|
|||||||
MainTheme { FilterDialog(8, 16.0, {}) { _, _ -> } }
|
MainTheme { FilterDialog(8, 16.0, {}) { _, _ -> } }
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
|
||||||
@Composable
|
@Composable
|
||||||
fun FilterDialog(hours: Int, elevation: Double, toggle: () -> Unit, save: (Int, Double) -> Unit) {
|
fun FilterDialog(hours: Int, elevation: Double, toggle: () -> Unit, save: (Int, Double) -> Unit) {
|
||||||
val hoursValue = rememberSaveable { mutableStateOf(hours) }
|
val hoursValue = rememberSaveable { mutableStateOf(hours) }
|
||||||
val elevValue = rememberSaveable { mutableStateOf(elevation) }
|
val elevValue = rememberSaveable { mutableStateOf(elevation) }
|
||||||
Dialog(onDismissRequest = { toggle() }) {
|
Dialog(onDismissRequest = { toggle() }) {
|
||||||
ElevatedCard {
|
ElevatedCard {
|
||||||
Column(
|
Column(horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.fillMaxWidth(1f)) {
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
|
||||||
modifier = Modifier.fillMaxWidth(1f)
|
|
||||||
) {
|
|
||||||
Text(text = "Filter passes", color = MaterialTheme.colorScheme.primary)
|
Text(text = "Filter passes", color = MaterialTheme.colorScheme.primary)
|
||||||
Text(text = "Show passes that occur within X hours")
|
Text(text = "Show passes that occur within X hours")
|
||||||
OutlinedTextField(value = hoursValue.value.toString(), onValueChange = { newValue ->
|
OutlinedTextField(value = hoursValue.value.toString(), onValueChange = { newValue ->
|
||||||
@@ -68,10 +67,7 @@ fun FilterDialog(hours: Int, elevation: Double, toggle: () -> Unit, save: (Int,
|
|||||||
}
|
}
|
||||||
elevValue.value = maxElevation
|
elevValue.value = maxElevation
|
||||||
})
|
})
|
||||||
Row(
|
Row(horizontalArrangement = Arrangement.SpaceBetween, modifier = Modifier.fillMaxWidth()) {
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
|
||||||
modifier = Modifier.fillMaxWidth()
|
|
||||||
) {
|
|
||||||
CardButton(onClick = { toggle() }, text = "Cancel")
|
CardButton(onClick = { toggle() }, text = "Cancel")
|
||||||
CardButton(
|
CardButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import androidx.compose.foundation.layout.Arrangement
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.ElevatedCard
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.OutlinedTextField
|
||||||
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.saveable.rememberSaveable
|
import androidx.compose.runtime.saveable.rememberSaveable
|
||||||
@@ -23,29 +26,17 @@ private fun LocatorDialogPreview() {
|
|||||||
MainTheme { LocatorDialog("IO91vl", {}) { } }
|
MainTheme { LocatorDialog("IO91vl", {}) { } }
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
|
||||||
@Composable
|
@Composable
|
||||||
fun LocatorDialog(qthLocator: String, hide: () -> Unit, save: (String) -> Unit) {
|
fun LocatorDialog(qthLocator: String, hide: () -> Unit, save: (String) -> Unit) {
|
||||||
val locator = rememberSaveable { mutableStateOf(qthLocator) }
|
val locator = rememberSaveable { mutableStateOf(qthLocator) }
|
||||||
Dialog(onDismissRequest = { hide() }) {
|
Dialog(onDismissRequest = { hide() }) {
|
||||||
ElevatedCard {
|
ElevatedCard {
|
||||||
Column(
|
Column(horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.fillMaxWidth(1f)) {
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
Text(text = stringResource(id = R.string.locator_title), color = MaterialTheme.colorScheme.primary)
|
||||||
modifier = Modifier.fillMaxWidth(1f)
|
|
||||||
) {
|
|
||||||
Text(
|
|
||||||
text = stringResource(id = R.string.locator_title),
|
|
||||||
color = MaterialTheme.colorScheme.primary
|
|
||||||
)
|
|
||||||
Text(text = stringResource(id = R.string.locator_text))
|
Text(text = stringResource(id = R.string.locator_text))
|
||||||
OutlinedTextField(value = locator.value, onValueChange = { locator.value = it })
|
OutlinedTextField(value = locator.value, onValueChange = { locator.value = it })
|
||||||
Row(
|
Row(horizontalArrangement = Arrangement.SpaceBetween, modifier = Modifier.fillMaxWidth()) {
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
CardButton(onClick = { hide() }, text = stringResource(id = R.string.btn_cancel))
|
||||||
modifier = Modifier.fillMaxWidth()
|
|
||||||
) {
|
|
||||||
CardButton(
|
|
||||||
onClick = { hide() }, text = stringResource(id = R.string.btn_cancel)
|
|
||||||
)
|
|
||||||
CardButton(
|
CardButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
save(locator.value)
|
save(locator.value)
|
||||||
|
|||||||
@@ -2,11 +2,19 @@ package com.rtbishop.look4sat.presentation.dialogs
|
|||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.lazy.grid.GridCells
|
import androidx.compose.foundation.lazy.grid.GridCells
|
||||||
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
|
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
|
||||||
import androidx.compose.foundation.lazy.grid.items
|
import androidx.compose.foundation.lazy.grid.items
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.Checkbox
|
||||||
|
import androidx.compose.material3.ElevatedCard
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.Surface
|
||||||
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
@@ -26,7 +34,7 @@ private val allModes = listOf(
|
|||||||
"LRPT", "LSB", "MFSK", "MSK", "MSK AX.100 Mode 5", "MSK AX.100 Mode 6", "OFDM", "OQPSK",
|
"LRPT", "LSB", "MFSK", "MSK", "MSK AX.100 Mode 5", "MSK AX.100 Mode 6", "OFDM", "OQPSK",
|
||||||
"PSK", "PSK31", "PSK63", "QPSK", "QPSK31", "QPSK63", "SSTV", "USB", "WSJT"
|
"PSK", "PSK31", "PSK63", "QPSK", "QPSK31", "QPSK63", "SSTV", "USB", "WSJT"
|
||||||
)
|
)
|
||||||
private val selectedModes = mutableListOf<String>("AFSK", "AFSK S-Net")
|
private val selectedModes = mutableListOf("AFSK", "AFSK S-Net")
|
||||||
|
|
||||||
@Preview(showBackground = true)
|
@Preview(showBackground = true)
|
||||||
@Composable
|
@Composable
|
||||||
@@ -41,12 +49,7 @@ private fun ModesDialogPreview() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ModesDialog(
|
fun ModesDialog(list: List<String>, selected: List<String>, toggle: () -> Unit, click: (String) -> Unit) {
|
||||||
list: List<String>,
|
|
||||||
selected: List<String>,
|
|
||||||
toggle: () -> Unit,
|
|
||||||
click: (String) -> Unit
|
|
||||||
) {
|
|
||||||
Dialog(onDismissRequest = { toggle() }) {
|
Dialog(onDismissRequest = { toggle() }) {
|
||||||
ElevatedCard(modifier = Modifier.fillMaxHeight(0.9f)) {
|
ElevatedCard(modifier = Modifier.fillMaxHeight(0.9f)) {
|
||||||
LazyVerticalGrid(
|
LazyVerticalGrid(
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import androidx.compose.foundation.layout.Arrangement
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.ElevatedCard
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.OutlinedTextField
|
||||||
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.saveable.rememberSaveable
|
import androidx.compose.runtime.saveable.rememberSaveable
|
||||||
@@ -23,32 +26,22 @@ private fun PositionDialogPreview() {
|
|||||||
MainTheme { PositionDialog(0.0, 0.0, {}) { _, _ -> } }
|
MainTheme { PositionDialog(0.0, 0.0, {}) { _, _ -> } }
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
|
||||||
@Composable
|
@Composable
|
||||||
fun PositionDialog(lat: Double, lon: Double, hide: () -> Unit, save: (Double, Double) -> Unit) {
|
fun PositionDialog(lat: Double, lon: Double, hide: () -> Unit, save: (Double, Double) -> Unit) {
|
||||||
val latValue = rememberSaveable { mutableStateOf(lat.toString()) }
|
val latValue = rememberSaveable { mutableStateOf(lat.toString()) }
|
||||||
val lonValue = rememberSaveable { mutableStateOf(lon.toString()) }
|
val lonValue = rememberSaveable { mutableStateOf(lon.toString()) }
|
||||||
Dialog(onDismissRequest = { hide() }) {
|
Dialog(onDismissRequest = { hide() }) {
|
||||||
ElevatedCard {
|
ElevatedCard {
|
||||||
Column(
|
Column(horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.fillMaxWidth(1f)) {
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
|
||||||
modifier = Modifier.fillMaxWidth(1f)
|
|
||||||
) {
|
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.position_title),
|
text = stringResource(id = R.string.position_title), color = MaterialTheme.colorScheme.primary
|
||||||
color = MaterialTheme.colorScheme.primary
|
|
||||||
)
|
)
|
||||||
Text(text = stringResource(id = R.string.position_lat_text))
|
Text(text = stringResource(id = R.string.position_lat_text))
|
||||||
OutlinedTextField(value = latValue.value, onValueChange = { latValue.value = it })
|
OutlinedTextField(value = latValue.value, onValueChange = { latValue.value = it })
|
||||||
Text(text = stringResource(id = R.string.position_lon_text))
|
Text(text = stringResource(id = R.string.position_lon_text))
|
||||||
OutlinedTextField(value = lonValue.value, onValueChange = { lonValue.value = it })
|
OutlinedTextField(value = lonValue.value, onValueChange = { lonValue.value = it })
|
||||||
Row(
|
Row(horizontalArrangement = Arrangement.SpaceBetween, modifier = Modifier.fillMaxWidth()) {
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
CardButton(onClick = { hide() }, text = stringResource(id = R.string.btn_cancel))
|
||||||
modifier = Modifier.fillMaxWidth()
|
|
||||||
) {
|
|
||||||
CardButton(
|
|
||||||
onClick = { hide() }, text = stringResource(id = R.string.btn_cancel)
|
|
||||||
)
|
|
||||||
CardButton(
|
CardButton(
|
||||||
onClick = { saveValues(latValue.value, lonValue.value, hide, save) },
|
onClick = { saveValues(latValue.value, lonValue.value, hide, save) },
|
||||||
text = stringResource(id = R.string.btn_accept)
|
text = stringResource(id = R.string.btn_accept)
|
||||||
|
|||||||
@@ -2,10 +2,18 @@ package com.rtbishop.look4sat.presentation.dialogs
|
|||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.ElevatedCard
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.RadioButton
|
||||||
|
import androidx.compose.material3.Surface
|
||||||
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|||||||
@@ -3,11 +3,26 @@ package com.rtbishop.look4sat.presentation.entries
|
|||||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.foundation.text.BasicTextField
|
import androidx.compose.foundation.text.BasicTextField
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.CardDefaults
|
||||||
|
import androidx.compose.material3.Checkbox
|
||||||
|
import androidx.compose.material3.ElevatedCard
|
||||||
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.IconButton
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.Surface
|
||||||
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.saveable.rememberSaveable
|
import androidx.compose.runtime.saveable.rememberSaveable
|
||||||
@@ -97,9 +112,7 @@ private fun SearchBar(setQuery: (String) -> Unit, modifier: Modifier = Modifier)
|
|||||||
singleLine = true,
|
singleLine = true,
|
||||||
modifier = modifier.padding(start = 12.dp),
|
modifier = modifier.padding(start = 12.dp),
|
||||||
textStyle = TextStyle(
|
textStyle = TextStyle(
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp, fontWeight = FontWeight.Medium, color = MaterialTheme.colorScheme.onSurface
|
||||||
fontWeight = FontWeight.Medium,
|
|
||||||
color = MaterialTheme.colorScheme.onSurface
|
|
||||||
),
|
),
|
||||||
decorationBox = { innerTextField ->
|
decorationBox = { innerTextField ->
|
||||||
if (currentQuery.value.isEmpty()) {
|
if (currentQuery.value.isEmpty()) {
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ import com.rtbishop.look4sat.domain.repository.ISettingsRepo
|
|||||||
import com.rtbishop.look4sat.domain.utility.QthConverter
|
import com.rtbishop.look4sat.domain.utility.QthConverter
|
||||||
import com.rtbishop.look4sat.domain.utility.toDegrees
|
import com.rtbishop.look4sat.domain.utility.toDegrees
|
||||||
import com.rtbishop.look4sat.domain.utility.toTimerString
|
import com.rtbishop.look4sat.domain.utility.toTimerString
|
||||||
|
import java.util.Date
|
||||||
|
import kotlin.collections.set
|
||||||
|
import kotlin.math.max
|
||||||
|
import kotlin.math.min
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.cancelAndJoin
|
import kotlinx.coroutines.cancelAndJoin
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
@@ -39,10 +43,6 @@ import kotlinx.coroutines.flow.SharedFlow
|
|||||||
import kotlinx.coroutines.flow.flow
|
import kotlinx.coroutines.flow.flow
|
||||||
import kotlinx.coroutines.isActive
|
import kotlinx.coroutines.isActive
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import java.util.Date
|
|
||||||
import kotlin.collections.set
|
|
||||||
import kotlin.math.max
|
|
||||||
import kotlin.math.min
|
|
||||||
|
|
||||||
class MapViewModel(private val satelliteRepo: ISatelliteRepo, settingsRepo: ISettingsRepo) : ViewModel() {
|
class MapViewModel(private val satelliteRepo: ISatelliteRepo, settingsRepo: ISettingsRepo) : ViewModel() {
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,25 @@ package com.rtbishop.look4sat.presentation.passes
|
|||||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.ElevatedCard
|
||||||
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.IconButton
|
||||||
|
import androidx.compose.material3.LinearProgressIndicator
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.Surface
|
||||||
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.collectAsState
|
import androidx.compose.runtime.collectAsState
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
@@ -19,14 +34,15 @@ import androidx.compose.ui.text.font.FontWeight
|
|||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.*
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.compose.ui.unit.sp
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import com.rtbishop.look4sat.R
|
import com.rtbishop.look4sat.R
|
||||||
import com.rtbishop.look4sat.domain.model.DataState
|
import com.rtbishop.look4sat.domain.model.DataState
|
||||||
import com.rtbishop.look4sat.domain.predict.NearEarthSatellite
|
import com.rtbishop.look4sat.domain.predict.NearEarthSatellite
|
||||||
import com.rtbishop.look4sat.domain.predict.OrbitalData
|
import com.rtbishop.look4sat.domain.predict.OrbitalData
|
||||||
import com.rtbishop.look4sat.domain.predict.SatPass
|
import com.rtbishop.look4sat.domain.predict.SatPass
|
||||||
import com.rtbishop.look4sat.presentation.*
|
import com.rtbishop.look4sat.presentation.MainTheme
|
||||||
import com.rtbishop.look4sat.presentation.dialogs.FilterDialog
|
import com.rtbishop.look4sat.presentation.dialogs.FilterDialog
|
||||||
import com.rtbishop.look4sat.presentation.pullRefresh.PullRefreshIndicator
|
import com.rtbishop.look4sat.presentation.pullRefresh.PullRefreshIndicator
|
||||||
import com.rtbishop.look4sat.presentation.pullRefresh.PullRefreshState
|
import com.rtbishop.look4sat.presentation.pullRefresh.PullRefreshState
|
||||||
|
|||||||
+5
-1
@@ -27,7 +27,11 @@ import androidx.compose.material3.CircularProgressIndicator
|
|||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.Surface
|
import androidx.compose.material3.Surface
|
||||||
import androidx.compose.material3.contentColorFor
|
import androidx.compose.material3.contentColorFor
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.Immutable
|
||||||
|
import androidx.compose.runtime.derivedStateOf
|
||||||
|
import androidx.compose.runtime.getValue
|
||||||
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.geometry.Offset
|
import androidx.compose.ui.geometry.Offset
|
||||||
|
|||||||
+12
-3
@@ -17,14 +17,23 @@
|
|||||||
package com.rtbishop.look4sat.presentation.pullRefresh
|
package com.rtbishop.look4sat.presentation.pullRefresh
|
||||||
|
|
||||||
import androidx.compose.animation.core.animate
|
import androidx.compose.animation.core.animate
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.SideEffect
|
||||||
|
import androidx.compose.runtime.State
|
||||||
|
import androidx.compose.runtime.derivedStateOf
|
||||||
|
import androidx.compose.runtime.getValue
|
||||||
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
import androidx.compose.runtime.remember
|
||||||
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
|
import androidx.compose.runtime.rememberUpdatedState
|
||||||
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.compose.ui.platform.LocalDensity
|
import androidx.compose.ui.platform.LocalDensity
|
||||||
import androidx.compose.ui.unit.Dp
|
import androidx.compose.ui.unit.Dp
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import kotlinx.coroutines.CoroutineScope
|
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a [PullRefreshState] that is remembered across compositions.
|
* Creates a [PullRefreshState] that is remembered across compositions.
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
package com.rtbishop.look4sat.presentation.radar
|
package com.rtbishop.look4sat.presentation.radar
|
||||||
|
|
||||||
import androidx.compose.animation.core.*
|
import androidx.compose.animation.core.animateFloat
|
||||||
|
import androidx.compose.animation.core.infiniteRepeatable
|
||||||
|
import androidx.compose.animation.core.rememberInfiniteTransition
|
||||||
|
import androidx.compose.animation.core.tween
|
||||||
import androidx.compose.foundation.Canvas
|
import androidx.compose.foundation.Canvas
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -10,9 +13,23 @@ import androidx.compose.runtime.mutableStateOf
|
|||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.geometry.Offset
|
import androidx.compose.ui.geometry.Offset
|
||||||
import androidx.compose.ui.graphics.*
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.drawscope.*
|
import androidx.compose.ui.graphics.Path
|
||||||
import androidx.compose.ui.text.*
|
import androidx.compose.ui.graphics.PathEffect
|
||||||
|
import androidx.compose.ui.graphics.PathMeasure
|
||||||
|
import androidx.compose.ui.graphics.ShaderBrush
|
||||||
|
import androidx.compose.ui.graphics.StampedPathEffectStyle
|
||||||
|
import androidx.compose.ui.graphics.SweepGradientShader
|
||||||
|
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||||
|
import androidx.compose.ui.graphics.drawscope.Fill
|
||||||
|
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||||
|
import androidx.compose.ui.graphics.drawscope.rotate
|
||||||
|
import androidx.compose.ui.graphics.drawscope.translate
|
||||||
|
import androidx.compose.ui.text.ExperimentalTextApi
|
||||||
|
import androidx.compose.ui.text.TextMeasurer
|
||||||
|
import androidx.compose.ui.text.TextStyle
|
||||||
|
import androidx.compose.ui.text.drawText
|
||||||
|
import androidx.compose.ui.text.rememberTextMeasurer
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.rtbishop.look4sat.domain.predict.PI_2
|
import com.rtbishop.look4sat.domain.predict.PI_2
|
||||||
import com.rtbishop.look4sat.domain.predict.SatPos
|
import com.rtbishop.look4sat.domain.predict.SatPos
|
||||||
|
|||||||
+4
-3
@@ -1,8 +1,9 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.0.2" apply false
|
id("com.android.application") version "8.1.0" apply false
|
||||||
id("com.android.library") version "7.1.2" apply false
|
id("com.android.library") version "7.1.2" apply false
|
||||||
id("com.google.devtools.ksp") version "1.8.21-1.0.11" apply false
|
id("com.google.devtools.ksp") version "1.9.0-1.0.13" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.8.21" apply false
|
id("org.jetbrains.kotlin.android") version "1.9.0" apply false
|
||||||
|
id("org.jetbrains.kotlin.jvm") version "1.9.0" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("clean", Delete::class.java) {
|
tasks.register("clean", Delete::class.java) {
|
||||||
|
|||||||
@@ -17,7 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
package com.rtbishop.look4sat.data.database.dao
|
package com.rtbishop.look4sat.data.database.dao
|
||||||
|
|
||||||
import androidx.room.*
|
import androidx.room.Dao
|
||||||
|
import androidx.room.Insert
|
||||||
|
import androidx.room.OnConflictStrategy
|
||||||
|
import androidx.room.Query
|
||||||
|
import androidx.room.Transaction
|
||||||
import com.rtbishop.look4sat.data.database.entity.SatEntry
|
import com.rtbishop.look4sat.data.database.entity.SatEntry
|
||||||
import com.rtbishop.look4sat.data.database.entity.SatItem
|
import com.rtbishop.look4sat.data.database.entity.SatItem
|
||||||
import com.rtbishop.look4sat.data.database.entity.SatRadio
|
import com.rtbishop.look4sat.data.database.entity.SatRadio
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("kotlin")
|
id("org.jetbrains.kotlin.jvm")
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
|
|||||||
@@ -21,6 +21,6 @@ sealed class DataState<out T> {
|
|||||||
data class Success<out T>(val data: T) : DataState<T>()
|
data class Success<out T>(val data: T) : DataState<T>()
|
||||||
data class Error(val resId: Int?) : DataState<Nothing>()
|
data class Error(val resId: Int?) : DataState<Nothing>()
|
||||||
data class Exception(val message: String?) : DataState<Nothing>()
|
data class Exception(val message: String?) : DataState<Nothing>()
|
||||||
object Handled : DataState<Nothing>()
|
data object Handled : DataState<Nothing>()
|
||||||
object Loading : DataState<Nothing>()
|
data object Loading : DataState<Nothing>()
|
||||||
}
|
}
|
||||||
@@ -1,26 +1,3 @@
|
|||||||
# Project-wide Gradle settings.
|
|
||||||
# IDE (e.g. Android Studio) users:
|
|
||||||
# Gradle settings configured through the IDE *will override*
|
|
||||||
# any settings specified in this file.
|
|
||||||
# For more details on how to configure your build environment visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
|
||||||
#org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
||||||
# org.gradle.parallel=true
|
|
||||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
|
||||||
# Android operating system, and which are packaged with your app"s APK
|
|
||||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
|
||||||
#android.useAndroidX=true
|
|
||||||
# Kotlin code style for this project: "official" or "obsolete":
|
|
||||||
#kotlin.code.style=official
|
|
||||||
# Enables namespacing of each library's R class so that its R class includes only the
|
|
||||||
# resources declared in the library itself and none from the library's dependencies,
|
|
||||||
# thereby reducing the size of the R class for that library
|
|
||||||
#android.nonTransitiveRClass=true
|
|
||||||
android.defaults.buildfeatures.buildconfig=false
|
android.defaults.buildfeatures.buildconfig=false
|
||||||
android.enableJetifier=false
|
android.enableJetifier=false
|
||||||
android.nonFinalResIds=true
|
android.nonFinalResIds=true
|
||||||
|
|||||||
Reference in new issue
Block a user