Compare commits
40
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
744e4f2e99 | ||
|
|
ab0037df7a | ||
|
|
9ad9aa7754 | ||
|
|
5109e15a09 | ||
|
|
9c3373ab35 | ||
|
|
5cd14cd726 | ||
|
|
98045da201 | ||
|
|
718af91315 | ||
|
|
ac6b6c7a25 | ||
|
|
6fe0135bef | ||
|
|
c7f2d4cf3f | ||
|
|
d39a0426b0 | ||
|
|
10c59175f4 | ||
|
|
ef1420b313 | ||
|
|
4ae44aa261 | ||
|
|
81fba8e2b5 | ||
|
|
01e7ad07c8 | ||
|
|
3ccd2db7b1 | ||
|
|
b6823bbdfb | ||
|
|
b3ff9f4bb9 | ||
|
|
ee5b9fa24b | ||
|
|
cd523f8282 | ||
|
|
06180f95a8 | ||
|
|
dbfc7fb866 | ||
|
|
0e655371c7 | ||
|
|
d776b479fa | ||
|
|
1613aeb3f4 | ||
|
|
e378f1e6ea | ||
|
|
70800ee850 | ||
|
|
984bcc1698 | ||
|
|
79275f5704 | ||
|
|
ad5bb5537b | ||
|
|
85896d0f97 | ||
|
|
386586ccae | ||
|
|
4fc327342d | ||
|
|
500d58eb74 | ||
|
|
1368c09c58 | ||
|
|
24a73969be | ||
|
|
5d0b2af665 | ||
|
|
8c906369df |
@@ -13,7 +13,24 @@ Dedicated to my daughter Luna.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Thanks for the valuable contributions to:
|
## Contributions
|
||||||
|
|
||||||
|
### Why isn't this hosted on GitHub?
|
||||||
|
|
||||||
|
I'm using a private git server just because I'm worried for the vast majority of open source code being hosted in a server property of Microsoft and being used to train theirs AI.
|
||||||
|
I didn't find a better option, BTW the Gitea project is working on implementing federation, so soon it will be possible to contribute using any other gitea server, selfhosted or not.
|
||||||
|
|
||||||
|
### How to contribute
|
||||||
|
|
||||||
|
The project is open to contribution, but with some limits:
|
||||||
|
|
||||||
|
- I'm sorry I can't accept AI-generated contributions. Reviewing a contribution requires time and effort from my side, while generating code with AI requires very little time and produces non reliable code that must be reviewed in detail. This is effectively shifting the work on my side, and in a forced way. If you feel you need a feature but you're not able to implement it by yourself, I prefer you to create an issue in the repository so I can implement it when I can, in a more mantainable way.
|
||||||
|
- I prefer to make project-wide changes (i.e. updating Android target, app name and icon, release number...) by myself.
|
||||||
|
|
||||||
|
To contribute, you'll have to create an account on this git instance. Unfortunately, I had to disable registration to avoid huge waves of fake accounts created by bots.
|
||||||
|
You can request an account writing to daniele.verducci@ichibi.eu
|
||||||
|
|
||||||
|
### Thanks for the valuable contributions to:
|
||||||
|
|
||||||
- Chepycou (French translation)
|
- Chepycou (French translation)
|
||||||
- Daniel Neubauer (German translation)
|
- Daniel Neubauer (German translation)
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
var currentPopupItems = listOf<LunaEvent.Type>()
|
var currentPopupItems = listOf<LunaEvent.Type>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lateinit var settingsRepository : LocalSettingsRepository
|
||||||
var logbook: Logbook? = null
|
var logbook: Logbook? = null
|
||||||
var pauseLogbookUpdate = false
|
var pauseLogbookUpdate = false
|
||||||
lateinit var progressIndicator: LinearProgressIndicator
|
lateinit var progressIndicator: LinearProgressIndicator
|
||||||
@@ -77,6 +78,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
handler = Handler(mainLooper)
|
handler = Handler(mainLooper)
|
||||||
|
settingsRepository = LocalSettingsRepository(this@MainActivity)
|
||||||
|
|
||||||
// Show view
|
// Show view
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
@@ -139,7 +141,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun populateHeaderMenu() {
|
private fun populateHeaderMenu() {
|
||||||
val settingsRepository = LocalSettingsRepository(this)
|
|
||||||
val dynamicMenu = settingsRepository.loadDynamicMenu()
|
val dynamicMenu = settingsRepository.loadDynamicMenu()
|
||||||
val eventTypeStats = mutableMapOf<LunaEvent.Type, Int>()
|
val eventTypeStats = mutableMapOf<LunaEvent.Type, Int>()
|
||||||
|
|
||||||
@@ -212,7 +213,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
super.onStart()
|
super.onStart()
|
||||||
|
|
||||||
val settingsRepository = LocalSettingsRepository(this)
|
|
||||||
if (settingsRepository.loadDataRepository() == LocalSettingsRepository.DATA_REPO.WEBDAV) {
|
if (settingsRepository.loadDataRepository() == LocalSettingsRepository.DATA_REPO.WEBDAV) {
|
||||||
val webDavCredentials = settingsRepository.loadWebdavCredentials()
|
val webDavCredentials = settingsRepository.loadWebdavCredentials()
|
||||||
if (webDavCredentials == null) {
|
if (webDavCredentials == null) {
|
||||||
@@ -764,7 +764,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
val d = AlertDialog.Builder(this)
|
val d = AlertDialog.Builder(this)
|
||||||
d.setTitle(R.string.trim_logbook_dialog_title)
|
d.setTitle(R.string.trim_logbook_dialog_title)
|
||||||
d.setMessage(
|
d.setMessage(
|
||||||
when (LocalSettingsRepository(this).loadDataRepository()) {
|
when (settingsRepository.loadDataRepository()) {
|
||||||
LocalSettingsRepository.DATA_REPO.WEBDAV -> R.string.trim_logbook_dialog_message_dav
|
LocalSettingsRepository.DATA_REPO.WEBDAV -> R.string.trim_logbook_dialog_message_dav
|
||||||
else -> R.string.trim_logbook_dialog_message_local
|
else -> R.string.trim_logbook_dialog_message_local
|
||||||
}
|
}
|
||||||
@@ -1000,7 +1000,9 @@ class MainActivity : AppCompatActivity() {
|
|||||||
val spinner = findViewById<Spinner>(R.id.logbooks_spinner)
|
val spinner = findViewById<Spinner>(R.id.logbooks_spinner)
|
||||||
val sAdapter = ArrayAdapter<String>(this@MainActivity, android.R.layout.simple_spinner_item)
|
val sAdapter = ArrayAdapter<String>(this@MainActivity, android.R.layout.simple_spinner_item)
|
||||||
sAdapter.setDropDownViewResource(R.layout.row_logbook_spinner)
|
sAdapter.setDropDownViewResource(R.layout.row_logbook_spinner)
|
||||||
for (ln in logbooksNames) {
|
|
||||||
|
val selectedLogbook = settingsRepository.loadSelectedLogbook()
|
||||||
|
logbooksNames.forEach { ln ->
|
||||||
sAdapter.add(
|
sAdapter.add(
|
||||||
ln.ifEmpty { getString(R.string.default_logbook_name) }
|
ln.ifEmpty { getString(R.string.default_logbook_name) }
|
||||||
)
|
)
|
||||||
@@ -1013,14 +1015,20 @@ class MainActivity : AppCompatActivity() {
|
|||||||
position: Int,
|
position: Int,
|
||||||
id: Long
|
id: Long
|
||||||
) {
|
) {
|
||||||
|
val logbookName = logbooksNames[position]
|
||||||
// Changed logbook: empty list
|
// Changed logbook: empty list
|
||||||
setListAdapter(arrayListOf())
|
setListAdapter(arrayListOf())
|
||||||
// Load logbook
|
// Load logbook
|
||||||
loadLogbook(logbooksNames.get(position))
|
loadLogbook(logbookName)
|
||||||
|
// Save logbook selection
|
||||||
|
settingsRepository.saveSelectedLogbook(logbookName)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNothingSelected(parent: AdapterView<*>?) {}
|
override fun onNothingSelected(parent: AdapterView<*>?) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val selected = logbooksNames.indexOf(selectedLogbook)
|
||||||
|
if (selected > 0) spinner.setSelection(selected)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
@@ -15,6 +15,7 @@ class LocalSettingsRepository(val context: Context) {
|
|||||||
const val SHARED_PREFS_DAV_PASS = "webdav_password"
|
const val SHARED_PREFS_DAV_PASS = "webdav_password"
|
||||||
const val SHARED_PREFS_DYNAMIC_MENU = "dynamic_menu"
|
const val SHARED_PREFS_DYNAMIC_MENU = "dynamic_menu"
|
||||||
const val SHARED_PREFS_SIGNATURE = "signature"
|
const val SHARED_PREFS_SIGNATURE = "signature"
|
||||||
|
const val SHARED_PREFS_SELECTED_LOGBOOK = "selected_logbook"
|
||||||
}
|
}
|
||||||
enum class DATA_REPO {LOCAL_FILE, WEBDAV}
|
enum class DATA_REPO {LOCAL_FILE, WEBDAV}
|
||||||
val sharedPreferences: SharedPreferences
|
val sharedPreferences: SharedPreferences
|
||||||
@@ -76,4 +77,14 @@ class LocalSettingsRepository(val context: Context) {
|
|||||||
return null
|
return null
|
||||||
return arrayOf(url, user, pass)
|
return arrayOf(url, user, pass)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun saveSelectedLogbook(selectedLogbookName: String) {
|
||||||
|
sharedPreferences.edit (commit = true) {
|
||||||
|
putString(SHARED_PREFS_SELECTED_LOGBOOK, selectedLogbookName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun loadSelectedLogbook() : String? {
|
||||||
|
return sharedPreferences.getString(SHARED_PREFS_SELECTED_LOGBOOK, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+11
-1
@@ -20,4 +20,14 @@ kotlin.code.style=official
|
|||||||
# Enables namespacing of each library's R class so that its R class includes only the
|
# 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,
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
# thereby reducing the size of the R class for that library
|
# thereby reducing the size of the R class for that library
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
|
android.defaults.buildfeatures.resvalues=true
|
||||||
|
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
|
||||||
|
android.enableAppCompileTimeRClass=false
|
||||||
|
android.usesSdkInManifest.disallowed=false
|
||||||
|
android.uniquePackageNames=false
|
||||||
|
android.dependency.useConstraints=true
|
||||||
|
android.r8.strictFullModeForKeepRules=false
|
||||||
|
android.r8.optimizedResourceShrinking=false
|
||||||
|
android.builtInKotlin=false
|
||||||
|
android.newDsl=false
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
agp = "8.13.0"
|
agp = "9.4.1"
|
||||||
kotlin = "2.0.0"
|
kotlin = "2.2.10"
|
||||||
coreKtx = "1.10.1"
|
coreKtx = "1.10.1"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.1.5"
|
junitVersion = "1.1.5"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#Sat Nov 02 10:58:51 CET 2024
|
#Sat Nov 02 10:58:51 CET 2024
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Reference in New Issue
Block a user