Floret is promoted to the family / design-language (shared-kit) name; the
tasks app itself becomes Agendula (de.jeanlucmakiola.agendula) — agenda
('things to be done') + Calendula's -ula, a twin of the Calendula name.
Renames the package, namespace, applicationId, rootProject.name, app_name,
FloretApp/FloretNavHost/FloretTransitions classes, theme, F-Droid metadata
dir, CI artifact name, and docs. The botanical word 'florets' is preserved in
the name-origin prose, which is rewritten to Agendula's etymology. Clean
build + unit tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,11 +16,11 @@ val keystoreProperties = Properties().apply {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "de.jeanlucmakiola.floret"
|
||||
namespace = "de.jeanlucmakiola.agendula"
|
||||
compileSdk = 37
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "de.jeanlucmakiola.floret"
|
||||
applicationId = "de.jeanlucmakiola.agendula"
|
||||
minSdk = 29
|
||||
targetSdk = 36
|
||||
// The git tag is the single source of truth for released builds: at
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".FloretApp"
|
||||
android:name=".AgendulaApp"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
@@ -39,7 +39,7 @@
|
||||
android:localeConfig="@xml/locales_config"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Floret"
|
||||
android:theme="@style/Theme.Agendula"
|
||||
tools:targetApi="35">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret
|
||||
package de.jeanlucmakiola.agendula
|
||||
|
||||
import android.app.Application
|
||||
import dagger.hilt.EntryPoint
|
||||
@@ -6,19 +6,19 @@ import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.EntryPointAccessors
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import de.jeanlucmakiola.floret.data.reminders.ReminderScheduler
|
||||
import de.jeanlucmakiola.agendula.data.reminders.ReminderScheduler
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* Application entry point. Registered as android:name=".FloretApp". Besides
|
||||
* Application entry point. Registered as android:name=".AgendulaApp". Besides
|
||||
* Hilt init, it kicks off a reminder re-sync on launch (independent of any UI),
|
||||
* so alarms reflect tasks synced while the app was closed.
|
||||
*/
|
||||
@HiltAndroidApp
|
||||
class FloretApp : Application() {
|
||||
class AgendulaApp : Application() {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret
|
||||
package de.jeanlucmakiola.agendula
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
@@ -14,11 +14,11 @@ import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import de.jeanlucmakiola.floret.data.demo.DemoSeeder
|
||||
import de.jeanlucmakiola.floret.data.prefs.ThemeMode
|
||||
import de.jeanlucmakiola.floret.ui.RootScreen
|
||||
import de.jeanlucmakiola.floret.ui.settings.SettingsViewModel
|
||||
import de.jeanlucmakiola.floret.ui.theme.FloretTheme
|
||||
import de.jeanlucmakiola.agendula.data.demo.DemoSeeder
|
||||
import de.jeanlucmakiola.agendula.data.prefs.ThemeMode
|
||||
import de.jeanlucmakiola.agendula.ui.RootScreen
|
||||
import de.jeanlucmakiola.agendula.ui.settings.SettingsViewModel
|
||||
import de.jeanlucmakiola.agendula.ui.theme.AgendulaTheme
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
|
||||
@@ -36,7 +36,7 @@ class MainActivity : ComponentActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
|
||||
// Debug-only sample data: `am start ... --ez floret_seed true`. Seeds a
|
||||
// Debug-only sample data: `am start ... --ez agendula_seed true`. Seeds a
|
||||
// local (non-syncing) demo list once; no-op without the extra.
|
||||
if (BuildConfig.DEBUG && intent.getBooleanExtra(EXTRA_SEED, false)) {
|
||||
lifecycleScope.launch { runCatching { demoSeeder.seed() } }
|
||||
@@ -49,15 +49,15 @@ class MainActivity : ComponentActivity() {
|
||||
ThemeMode.LIGHT -> false
|
||||
ThemeMode.DARK -> true
|
||||
}
|
||||
FloretTheme(darkTheme = darkTheme, dynamicColor = ui.settings.dynamicColor) {
|
||||
AgendulaTheme(darkTheme = darkTheme, dynamicColor = ui.settings.dynamicColor) {
|
||||
RootScreen(modifier = Modifier.fillMaxSize())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val EXTRA_TASK_ID = "de.jeanlucmakiola.floret.extra.TASK_ID"
|
||||
private const val EXTRA_SEED = "floret_seed"
|
||||
const val EXTRA_TASK_ID = "de.jeanlucmakiola.agendula.extra.TASK_ID"
|
||||
private const val EXTRA_SEED = "agendula_seed"
|
||||
|
||||
/** Opens the app focused on a task (reminder taps). Routing lands with the UI. */
|
||||
fun taskIntent(context: Context, taskId: Long): Intent =
|
||||
@@ -1,10 +1,10 @@
|
||||
package de.jeanlucmakiola.floret.data.demo
|
||||
package de.jeanlucmakiola.agendula.data.demo
|
||||
|
||||
import de.jeanlucmakiola.floret.data.di.IoDispatcher
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.floret.domain.DayWindow
|
||||
import de.jeanlucmakiola.floret.domain.Priority
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.data.di.IoDispatcher
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.agendula.domain.DayWindow
|
||||
import de.jeanlucmakiola.agendula.domain.Priority
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -16,10 +16,10 @@ import kotlin.time.Instant
|
||||
|
||||
/**
|
||||
* Debug-only one-shot sample data. Creates a **local, device-only** list
|
||||
* ("Floret Demo") — so nothing syncs to a CalDAV server — and fills it with
|
||||
* ("Agendula Demo") — so nothing syncs to a CalDAV server — and fills it with
|
||||
* tasks spread across overdue / today / upcoming / no-date / completed so every
|
||||
* smart list shows content. Idempotent: skips if the demo list already exists.
|
||||
* Triggered from [de.jeanlucmakiola.floret.MainActivity] only in debug builds.
|
||||
* Triggered from [de.jeanlucmakiola.agendula.MainActivity] only in debug builds.
|
||||
*/
|
||||
@Singleton
|
||||
class DemoSeeder @Inject constructor(
|
||||
@@ -47,14 +47,14 @@ class DemoSeeder @Inject constructor(
|
||||
repository.createTask(TaskForm(title = "Gather receipts", listId = listId, parentId = invoiceId))
|
||||
repository.createTask(TaskForm(title = "Book train tickets", listId = listId, due = at(te + 6 * day), priority = Priority.LOW))
|
||||
repository.createTask(TaskForm(title = "Read Compose 1.5 release notes", listId = listId))
|
||||
repository.createTask(TaskForm(title = "Sketch the Floret app icon", listId = listId))
|
||||
repository.createTask(TaskForm(title = "Sketch the Agendula app icon", listId = listId))
|
||||
|
||||
val done = repository.createTask(TaskForm(title = "Renew domain name", listId = listId, due = at(ts - 2 * day)))
|
||||
repository.setCompleted(done, completed = true)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val DEMO_LIST = "Floret Demo"
|
||||
const val DEMO_LIST = "Agendula Demo"
|
||||
const val DEMO_COLOR = 0xFF7A5C6B.toInt()
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.di
|
||||
package de.jeanlucmakiola.agendula.data.di
|
||||
|
||||
import android.content.Context
|
||||
import androidx.datastore.core.DataStore
|
||||
@@ -10,16 +10,16 @@ import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import de.jeanlucmakiola.floret.data.tasks.AndroidTasksDataSource
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksDataSource
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepositoryImpl
|
||||
import de.jeanlucmakiola.agendula.data.tasks.AndroidTasksDataSource
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksDataSource
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepositoryImpl
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import javax.inject.Singleton
|
||||
|
||||
private val Context.floretDataStore: DataStore<Preferences> by preferencesDataStore(
|
||||
name = "floret_prefs",
|
||||
private val Context.agendulaDataStore: DataStore<Preferences> by preferencesDataStore(
|
||||
name = "agendula_prefs",
|
||||
)
|
||||
|
||||
@Module
|
||||
@@ -42,7 +42,7 @@ object DataProvideModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideDataStore(@ApplicationContext context: Context): DataStore<Preferences> =
|
||||
context.floretDataStore
|
||||
context.agendulaDataStore
|
||||
|
||||
@Provides
|
||||
@IoDispatcher
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.di
|
||||
package de.jeanlucmakiola.agendula.data.di
|
||||
|
||||
import javax.inject.Qualifier
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.prefs
|
||||
package de.jeanlucmakiola.agendula.data.prefs
|
||||
|
||||
import androidx.datastore.core.DataStore
|
||||
import androidx.datastore.preferences.core.Preferences
|
||||
@@ -8,7 +8,7 @@ import androidx.datastore.preferences.core.intPreferencesKey
|
||||
import androidx.datastore.preferences.core.longPreferencesKey
|
||||
import androidx.datastore.preferences.core.stringPreferencesKey
|
||||
import androidx.datastore.preferences.core.stringSetPreferencesKey
|
||||
import de.jeanlucmakiola.floret.domain.TaskFormField
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFormField
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.map
|
||||
import javax.inject.Inject
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.reminders
|
||||
package de.jeanlucmakiola.agendula.data.reminders
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
@@ -1,11 +1,11 @@
|
||||
package de.jeanlucmakiola.floret.data.reminders
|
||||
package de.jeanlucmakiola.agendula.data.reminders
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import de.jeanlucmakiola.floret.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksDataSource
|
||||
import de.jeanlucmakiola.agendula.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksDataSource
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
@@ -43,7 +43,7 @@ class DueReminderReceiver : BroadcastReceiver() {
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val EXTRA_TASK_ID = "de.jeanlucmakiola.floret.extra.TASK_ID"
|
||||
private const val EXTRA_TASK_ID = "de.jeanlucmakiola.agendula.extra.TASK_ID"
|
||||
|
||||
fun intent(context: Context, taskId: Long): Intent =
|
||||
Intent(context, DueReminderReceiver::class.java).putExtra(EXTRA_TASK_ID, taskId)
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.reminders
|
||||
package de.jeanlucmakiola.agendula.data.reminders
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
@@ -12,7 +12,7 @@ import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* Re-syncs reminders whenever the tasks provider changes — covers external sync
|
||||
* (DAVx5 pulling new/edited tasks) while Floret isn't in the foreground. The
|
||||
* (DAVx5 pulling new/edited tasks) while Agendula isn't in the foreground. The
|
||||
* manifest filter targets both known authorities; best-effort (the in-app
|
||||
* ContentObserver covers the foreground case regardless).
|
||||
*/
|
||||
@@ -1,15 +1,15 @@
|
||||
package de.jeanlucmakiola.floret.data.reminders
|
||||
package de.jeanlucmakiola.agendula.data.reminders
|
||||
|
||||
import android.app.AlarmManager
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import de.jeanlucmakiola.floret.data.di.IoDispatcher
|
||||
import de.jeanlucmakiola.floret.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.floret.data.tasks.ProviderResolver
|
||||
import de.jeanlucmakiola.floret.data.tasks.TaskQuery
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksDataSource
|
||||
import de.jeanlucmakiola.agendula.data.di.IoDispatcher
|
||||
import de.jeanlucmakiola.agendula.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.agendula.data.tasks.ProviderResolver
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TaskQuery
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksDataSource
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -18,7 +18,7 @@ import javax.inject.Singleton
|
||||
|
||||
/**
|
||||
* The self-scheduled due-reminder engine. Tasks providers don't deliver
|
||||
* reminders, so Floret reads upcoming due tasks and arms one exact [AlarmManager]
|
||||
* reminders, so Agendula reads upcoming due tasks and arms one exact [AlarmManager]
|
||||
* alarm each, within a rolling window. Re-run on app start, boot and provider
|
||||
* change; it diffs against [ScheduledReminderStore] so only changed alarms move.
|
||||
*/
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.reminders
|
||||
package de.jeanlucmakiola.agendula.data.reminders
|
||||
|
||||
import androidx.datastore.core.DataStore
|
||||
import androidx.datastore.preferences.core.Preferences
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.reminders
|
||||
package de.jeanlucmakiola.agendula.data.reminders
|
||||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
@@ -12,9 +12,9 @@ import android.os.Build
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import de.jeanlucmakiola.floret.MainActivity
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.agendula.MainActivity
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import java.time.Instant as JInstant
|
||||
import java.time.ZoneId
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import android.content.ContentResolver
|
||||
import android.content.ContentUris
|
||||
@@ -9,12 +9,12 @@ import android.net.Uri
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Instances
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Instances
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
import java.time.ZoneId
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import android.database.Cursor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
/** No tasks provider (OpenTasks / tasks.org) is installed on the device. */
|
||||
class ProviderUnavailableException :
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
@@ -8,7 +8,7 @@ import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
/**
|
||||
* A tasks provider Floret can talk to. The same dmfs `TaskProvider` backs every
|
||||
* A tasks provider Agendula can talk to. The same dmfs `TaskProvider` backs every
|
||||
* candidate, so the [TasksContract] columns apply regardless of which is present.
|
||||
*/
|
||||
data class TaskProvider(
|
||||
@@ -1,12 +1,12 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Instances
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.floret.domain.priorityFromICal
|
||||
import de.jeanlucmakiola.floret.domain.statusFromInt
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Instances
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.domain.priorityFromICal
|
||||
import de.jeanlucmakiola.agendula.domain.statusFromInt
|
||||
import kotlin.time.Instant
|
||||
|
||||
/** Maps a provider row (via [ColumnReader]) to a domain model. Pure + testable. */
|
||||
@@ -1,8 +1,8 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Instances
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Instances
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Tasks
|
||||
|
||||
/** Column lists requested from the provider. Order is irrelevant; we read by name. */
|
||||
object TaskProjections {
|
||||
@@ -1,9 +1,9 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.floret.domain.toICal
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.domain.toICal
|
||||
|
||||
/**
|
||||
* Turns a [TaskForm] / mutation into a name→value map. Pure (no ContentValues),
|
||||
@@ -1,9 +1,9 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import android.net.Uri
|
||||
|
||||
/**
|
||||
* The subset of the OpenTasks `TaskContract` that Floret uses, vendored as
|
||||
* The subset of the OpenTasks `TaskContract` that Agendula uses, vendored as
|
||||
* Kotlin constants. Derived from `org.dmfs.tasks.contract.TaskContract`
|
||||
* (Apache-2.0, dmfs GmbH):
|
||||
* https://github.com/dmfs/opentasks/blob/master/opentasks-contract/src/main/java/org/dmfs/tasks/contract/TaskContract.java
|
||||
@@ -25,7 +25,7 @@ object TasksContract {
|
||||
const val PARAM_ACCOUNT_TYPE = "account_type"
|
||||
const val LOAD_PROPERTIES = "load_properties"
|
||||
|
||||
/** Account used for local, device-only task lists Floret owns. */
|
||||
/** Account used for local, device-only task lists Agendula owns. */
|
||||
const val LOCAL_ACCOUNT_NAME = "Local"
|
||||
const val LOCAL_ACCOUNT_TYPE = "org.dmfs.account.LOCAL"
|
||||
|
||||
@@ -85,7 +85,7 @@ object TasksContract {
|
||||
* The `instances` view — one row per task occurrence, with recurrence
|
||||
* resolved and absolute [INSTANCE_START]/[INSTANCE_DUE] timestamps. Inherits
|
||||
* every [Tasks] column (title, status, …) plus the instance-only columns
|
||||
* below. This is Floret's read source.
|
||||
* below. This is Agendula's read source.
|
||||
*/
|
||||
object Instances {
|
||||
const val PATH = "instances"
|
||||
@@ -1,8 +1,8 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
|
||||
/** What to fetch from the provider. Smart-list date logic is applied above this. */
|
||||
data class TaskQuery(
|
||||
@@ -1,14 +1,14 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskDetail
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskDetail
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlin.time.Instant
|
||||
|
||||
/** Whether Floret can use the tasks provider right now. Drives onboarding. */
|
||||
/** Whether Agendula can use the tasks provider right now. Drives onboarding. */
|
||||
enum class ProviderStatus { READY, NEEDS_PERMISSION, NO_PROVIDER }
|
||||
|
||||
/**
|
||||
@@ -1,14 +1,14 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import de.jeanlucmakiola.floret.data.di.IoDispatcher
|
||||
import de.jeanlucmakiola.floret.domain.DayWindow
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskDetail
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.floret.domain.TaskFiltering
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.floret.domain.TaskSorting
|
||||
import de.jeanlucmakiola.agendula.data.di.IoDispatcher
|
||||
import de.jeanlucmakiola.agendula.domain.DayWindow
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskDetail
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFiltering
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.domain.TaskSorting
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
import kotlinx.coroutines.channels.awaitClose
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import java.time.ZoneId
|
||||
import kotlin.time.Instant
|
||||
@@ -1,6 +1,6 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract
|
||||
import kotlin.time.Instant
|
||||
|
||||
/** A task list (the `tasklists` table). Lists group under their account. */
|
||||
@@ -14,7 +14,7 @@ data class TaskList(
|
||||
val isVisible: Boolean,
|
||||
val owner: String?,
|
||||
) {
|
||||
/** A device-only list Floret (or another app) created locally, not synced. */
|
||||
/** A device-only list Agendula (or another app) created locally, not synced. */
|
||||
val isLocal: Boolean get() = accountType == TasksContract.LOCAL_ACCOUNT_TYPE
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import kotlin.time.Instant
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import kotlin.time.Instant
|
||||
|
||||
/**
|
||||
* A validated create/edit form. Kept free of Android types so ViewModels and
|
||||
* tests can build and validate it on the JVM. The data layer turns it into
|
||||
* provider ContentValues ([de.jeanlucmakiola.floret.data.tasks.TaskWriteMapper]).
|
||||
* provider ContentValues ([de.jeanlucmakiola.agendula.data.tasks.TaskWriteMapper]).
|
||||
*/
|
||||
data class TaskForm(
|
||||
val title: String,
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import kotlin.time.Instant
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
/** Default task ordering, extracted so it's unit-testable without the repository. */
|
||||
object TaskSorting {
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui
|
||||
package de.jeanlucmakiola.agendula.ui
|
||||
|
||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
@@ -18,16 +18,16 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.floret.data.tasks.ProviderStatus
|
||||
import de.jeanlucmakiola.floret.ui.navigation.FloretNavHost
|
||||
import de.jeanlucmakiola.floret.ui.permission.PermissionViewModel
|
||||
import de.jeanlucmakiola.floret.ui.permission.ReminderOnboardingScreen
|
||||
import de.jeanlucmakiola.floret.ui.permission.ReminderOnboardingViewModel
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import de.jeanlucmakiola.agendula.data.tasks.ProviderStatus
|
||||
import de.jeanlucmakiola.agendula.ui.navigation.AgendulaNavHost
|
||||
import de.jeanlucmakiola.agendula.ui.permission.PermissionViewModel
|
||||
import de.jeanlucmakiola.agendula.ui.permission.ReminderOnboardingScreen
|
||||
import de.jeanlucmakiola.agendula.ui.permission.ReminderOnboardingViewModel
|
||||
|
||||
/**
|
||||
* App root: gates on the tasks-provider permission, then hands off to
|
||||
* [FloretNavHost] (lists → task list → detail / edit).
|
||||
* [AgendulaNavHost] (lists → task list → detail / edit).
|
||||
*/
|
||||
@Composable
|
||||
fun RootScreen(
|
||||
@@ -70,7 +70,7 @@ private fun ReadyGate(
|
||||
val done by onboardingViewModel.onboardingDone.collectAsStateWithLifecycle()
|
||||
Crossfade(targetState = done, label = "reminderOnboardingGate") { state ->
|
||||
when (state) {
|
||||
true -> FloretNavHost(modifier = modifier)
|
||||
true -> AgendulaNavHost(modifier = modifier)
|
||||
false -> ReminderOnboardingScreen(
|
||||
onFinished = onboardingViewModel::finish,
|
||||
modifier = modifier,
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Column
|
||||
@@ -25,7 +25,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
|
||||
/**
|
||||
* Shared collapsing scaffold for the settings hub, its sub-screens and the
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
@@ -31,7 +31,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import java.time.LocalDate
|
||||
import java.time.LocalTime
|
||||
import java.time.ZoneId
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import java.time.ZoneId
|
||||
import java.time.format.DateTimeFormatter
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
@@ -20,7 +20,7 @@ import androidx.compose.ui.unit.dp
|
||||
|
||||
/**
|
||||
* The app's borderless text input: no underline, no outline, just the tonal
|
||||
* card behind it. Floret uses this inside a tonal [androidx.compose.material3.Surface]
|
||||
* card behind it. Agendula uses this inside a tonal [androidx.compose.material3.Surface]
|
||||
* for the edit form (title + cards), so anything that takes text reads as one
|
||||
* family rather than a boxed Material field. Ported from Calendula so the two
|
||||
* apps share one input style.
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
@@ -39,7 +39,7 @@ fun pastelize(rawArgb: Int, dark: Boolean): Color {
|
||||
/**
|
||||
* Leading avatar for a task list: a neutral round chip holding a checklist glyph
|
||||
* tinted in the list's (pastelised) colour — the Calendula calendar-chip pattern,
|
||||
* with a task icon for Floret.
|
||||
* with a task icon for Agendula.
|
||||
*/
|
||||
@Composable
|
||||
fun ListColorChip(color: Int, modifier: Modifier = Modifier) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.material.icons.Icons
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
@@ -21,7 +21,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.isSpecified
|
||||
import androidx.compose.ui.graphics.luminance
|
||||
import androidx.compose.ui.unit.dp
|
||||
import de.jeanlucmakiola.floret.domain.Priority
|
||||
import de.jeanlucmakiola.agendula.domain.Priority
|
||||
|
||||
/**
|
||||
* Priority has no semantic Material role (M3 only ships `error` for danger), so
|
||||
@@ -1,10 +1,10 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.pluralStringResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
|
||||
/** Common reminder lead times offered as quick picks in the reminder pickers. */
|
||||
val REMINDER_PRESETS = listOf(0, 5, 10, 30, 60, 1_440)
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.expandVertically
|
||||
@@ -30,8 +30,8 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.unit.dp
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.floret.data.prefs.ListReminderOverride
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import de.jeanlucmakiola.agendula.data.prefs.ListReminderOverride
|
||||
|
||||
/**
|
||||
* Reminder lead-time picker, full-screen: the grouped list of preset lead times
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.common
|
||||
package de.jeanlucmakiola.agendula.ui.common
|
||||
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
@@ -26,7 +26,7 @@ import androidx.graphics.shapes.RoundedPolygon
|
||||
|
||||
/**
|
||||
* A top-bar action whose icon sits in a tonal container clipped to one of the
|
||||
* M3 Expressive [MaterialShapes] (cookie, clover, sunny, …) — Floret's playful
|
||||
* M3 Expressive [MaterialShapes] (cookie, clover, sunny, …) — Agendula's playful
|
||||
* take on a plain [androidx.compose.material3.IconButton]. Each action passes
|
||||
* its own [shape] and [containerColor], so a row of them reads as a set of
|
||||
* distinct little tokens rather than identical grey glyphs.
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.detail
|
||||
package de.jeanlucmakiola.agendula.ui.detail
|
||||
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
import androidx.compose.foundation.background
|
||||
@@ -67,16 +67,16 @@ import androidx.compose.ui.text.style.TextDecoration
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskDetail
|
||||
import de.jeanlucmakiola.floret.ui.common.GroupedSurface
|
||||
import de.jeanlucmakiola.floret.ui.common.PriorityChip
|
||||
import de.jeanlucmakiola.floret.ui.common.formatDate
|
||||
import de.jeanlucmakiola.floret.ui.common.formatTime
|
||||
import de.jeanlucmakiola.floret.ui.common.pastelize
|
||||
import de.jeanlucmakiola.floret.ui.common.positionOf
|
||||
import de.jeanlucmakiola.floret.ui.tasklist.priorityLabel
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskDetail
|
||||
import de.jeanlucmakiola.agendula.ui.common.GroupedSurface
|
||||
import de.jeanlucmakiola.agendula.ui.common.PriorityChip
|
||||
import de.jeanlucmakiola.agendula.ui.common.formatDate
|
||||
import de.jeanlucmakiola.agendula.ui.common.formatTime
|
||||
import de.jeanlucmakiola.agendula.ui.common.pastelize
|
||||
import de.jeanlucmakiola.agendula.ui.common.positionOf
|
||||
import de.jeanlucmakiola.agendula.ui.tasklist.priorityLabel
|
||||
|
||||
/**
|
||||
* One task's detail. Each fact is its own tonal card with a leading icon (the
|
||||
@@ -246,7 +246,7 @@ private fun DetailBody(
|
||||
}
|
||||
|
||||
// Priority — a coloured status chip in the level's hue.
|
||||
if (task.priority != de.jeanlucmakiola.floret.domain.Priority.NONE) {
|
||||
if (task.priority != de.jeanlucmakiola.agendula.domain.Priority.NONE) {
|
||||
add {
|
||||
DetailCard(
|
||||
icon = Icons.Rounded.Flag,
|
||||
@@ -1,12 +1,12 @@
|
||||
package de.jeanlucmakiola.floret.ui.detail
|
||||
package de.jeanlucmakiola.agendula.ui.detail
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskDetail
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskDetail
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.edit
|
||||
package de.jeanlucmakiola.agendula.ui.edit
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.expandVertically
|
||||
@@ -85,27 +85,27 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.floret.domain.DayWindow
|
||||
import de.jeanlucmakiola.floret.domain.Priority
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskFormError
|
||||
import de.jeanlucmakiola.floret.domain.TaskFormField
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.floret.domain.TaskSection
|
||||
import de.jeanlucmakiola.floret.domain.TaskSections
|
||||
import de.jeanlucmakiola.floret.ui.common.GroupedRow
|
||||
import de.jeanlucmakiola.floret.ui.common.InlineTextField
|
||||
import de.jeanlucmakiola.floret.ui.common.OptionCard
|
||||
import de.jeanlucmakiola.floret.ui.common.priorityFill
|
||||
import de.jeanlucmakiola.floret.ui.common.formatDate
|
||||
import de.jeanlucmakiola.floret.ui.common.formatTime
|
||||
import de.jeanlucmakiola.floret.ui.common.localToInstant
|
||||
import de.jeanlucmakiola.floret.ui.common.pastelize
|
||||
import de.jeanlucmakiola.floret.ui.common.positionOf
|
||||
import de.jeanlucmakiola.floret.ui.common.toLocalDate
|
||||
import de.jeanlucmakiola.floret.ui.common.toLocalTime
|
||||
import de.jeanlucmakiola.floret.ui.tasklist.priorityLabel
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import de.jeanlucmakiola.agendula.domain.DayWindow
|
||||
import de.jeanlucmakiola.agendula.domain.Priority
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFormError
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFormField
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.domain.TaskSection
|
||||
import de.jeanlucmakiola.agendula.domain.TaskSections
|
||||
import de.jeanlucmakiola.agendula.ui.common.GroupedRow
|
||||
import de.jeanlucmakiola.agendula.ui.common.InlineTextField
|
||||
import de.jeanlucmakiola.agendula.ui.common.OptionCard
|
||||
import de.jeanlucmakiola.agendula.ui.common.priorityFill
|
||||
import de.jeanlucmakiola.agendula.ui.common.formatDate
|
||||
import de.jeanlucmakiola.agendula.ui.common.formatTime
|
||||
import de.jeanlucmakiola.agendula.ui.common.localToInstant
|
||||
import de.jeanlucmakiola.agendula.ui.common.pastelize
|
||||
import de.jeanlucmakiola.agendula.ui.common.positionOf
|
||||
import de.jeanlucmakiola.agendula.ui.common.toLocalDate
|
||||
import de.jeanlucmakiola.agendula.ui.common.toLocalTime
|
||||
import de.jeanlucmakiola.agendula.ui.tasklist.priorityLabel
|
||||
import java.time.LocalTime
|
||||
import java.time.ZoneId
|
||||
import java.time.ZoneOffset
|
||||
@@ -119,7 +119,7 @@ import kotlin.time.Instant
|
||||
* "When" card with the all-day toggle and tappable schedule rows, a tappable
|
||||
* list card, and the optional Description / Priority / Reminder sections that
|
||||
* unfold from "More fields" (which ones start open is a setting). Validated
|
||||
* through the M1 [TaskEditViewModel] / [de.jeanlucmakiola.floret.domain.TaskForm];
|
||||
* through the M1 [TaskEditViewModel] / [de.jeanlucmakiola.agendula.domain.TaskForm];
|
||||
* the VM flips `saved` once the write lands, which pops us back.
|
||||
*/
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@@ -853,7 +853,7 @@ private fun ParentPickerSheet(
|
||||
item(key = "none") {
|
||||
GroupedRow(
|
||||
title = stringResource(R.string.edit_parent_none),
|
||||
position = de.jeanlucmakiola.floret.ui.common.Position.Alone,
|
||||
position = de.jeanlucmakiola.agendula.ui.common.Position.Alone,
|
||||
selected = selectedId == null,
|
||||
minHeight = 56.dp,
|
||||
onClick = { choose(null) },
|
||||
@@ -1,20 +1,20 @@
|
||||
package de.jeanlucmakiola.floret.ui.edit
|
||||
package de.jeanlucmakiola.agendula.ui.edit
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import de.jeanlucmakiola.floret.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.floret.data.reminders.ReminderScheduler
|
||||
import de.jeanlucmakiola.floret.data.tasks.TaskConflictException
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.floret.domain.Priority
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.floret.domain.TaskFormError
|
||||
import de.jeanlucmakiola.floret.domain.TaskFormField
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.floret.domain.populatedFields
|
||||
import de.jeanlucmakiola.agendula.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.agendula.data.reminders.ReminderScheduler
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TaskConflictException
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.agendula.domain.Priority
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFormError
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFormField
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.domain.populatedFields
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.lists
|
||||
package de.jeanlucmakiola.agendula.ui.lists
|
||||
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
@@ -45,14 +45,14 @@ import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.floret.domain.SmartList
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.floret.ui.common.ActionShapes
|
||||
import de.jeanlucmakiola.floret.ui.common.GroupedRow
|
||||
import de.jeanlucmakiola.floret.ui.common.ListColorChip
|
||||
import de.jeanlucmakiola.floret.ui.common.ShapedActionButton
|
||||
import de.jeanlucmakiola.floret.ui.common.positionOf
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import de.jeanlucmakiola.agendula.domain.SmartList
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.ui.common.ActionShapes
|
||||
import de.jeanlucmakiola.agendula.ui.common.GroupedRow
|
||||
import de.jeanlucmakiola.agendula.ui.common.ListColorChip
|
||||
import de.jeanlucmakiola.agendula.ui.common.ShapedActionButton
|
||||
import de.jeanlucmakiola.agendula.ui.common.positionOf
|
||||
|
||||
/**
|
||||
* Home: smart lists (Today / Overdue / Upcoming / All) as tonal cards with live
|
||||
@@ -1,15 +1,15 @@
|
||||
package de.jeanlucmakiola.floret.ui.lists
|
||||
package de.jeanlucmakiola.agendula.ui.lists
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.floret.domain.DayWindow
|
||||
import de.jeanlucmakiola.floret.domain.SmartList
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.floret.domain.TaskFiltering
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.agendula.domain.DayWindow
|
||||
import de.jeanlucmakiola.agendula.domain.SmartList
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFiltering
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.catch
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.navigation
|
||||
package de.jeanlucmakiola.agendula.ui.navigation
|
||||
|
||||
import androidx.compose.animation.EnterTransition
|
||||
import androidx.compose.animation.ExitTransition
|
||||
@@ -12,15 +12,15 @@ import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.floret.ui.detail.TaskDetailScreen
|
||||
import de.jeanlucmakiola.floret.ui.detail.TaskDetailViewModel
|
||||
import de.jeanlucmakiola.floret.ui.edit.TaskEditScreen
|
||||
import de.jeanlucmakiola.floret.ui.edit.TaskEditViewModel
|
||||
import de.jeanlucmakiola.floret.ui.lists.ListsScreen
|
||||
import de.jeanlucmakiola.floret.ui.settings.SettingsScreen
|
||||
import de.jeanlucmakiola.floret.ui.tasklist.TaskListScreen
|
||||
import de.jeanlucmakiola.floret.ui.tasklist.TaskListViewModel
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.ui.detail.TaskDetailScreen
|
||||
import de.jeanlucmakiola.agendula.ui.detail.TaskDetailViewModel
|
||||
import de.jeanlucmakiola.agendula.ui.edit.TaskEditScreen
|
||||
import de.jeanlucmakiola.agendula.ui.edit.TaskEditViewModel
|
||||
import de.jeanlucmakiola.agendula.ui.lists.ListsScreen
|
||||
import de.jeanlucmakiola.agendula.ui.settings.SettingsScreen
|
||||
import de.jeanlucmakiola.agendula.ui.tasklist.TaskListScreen
|
||||
import de.jeanlucmakiola.agendula.ui.tasklist.TaskListViewModel
|
||||
|
||||
/**
|
||||
* The single in-app back stack: lists → task list → detail / edit.
|
||||
@@ -32,7 +32,7 @@ import de.jeanlucmakiola.floret.ui.tasklist.TaskListViewModel
|
||||
* unaware of the nav library.
|
||||
*/
|
||||
@Composable
|
||||
fun FloretNavHost(modifier: Modifier = Modifier) {
|
||||
fun AgendulaNavHost(modifier: Modifier = Modifier) {
|
||||
val nav = rememberNavController()
|
||||
val slide = rememberNavSlideSpec()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.navigation
|
||||
package de.jeanlucmakiola.agendula.ui.navigation
|
||||
|
||||
import androidx.compose.animation.core.FiniteAnimationSpec
|
||||
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
||||
@@ -1,9 +1,9 @@
|
||||
package de.jeanlucmakiola.floret.ui.navigation
|
||||
package de.jeanlucmakiola.agendula.ui.navigation
|
||||
|
||||
import androidx.navigation.NavType
|
||||
import androidx.navigation.navArgument
|
||||
import de.jeanlucmakiola.floret.domain.SmartList
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.domain.SmartList
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
|
||||
/**
|
||||
* String-based route table for the app's [androidx.navigation.NavHost].
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.permission
|
||||
package de.jeanlucmakiola.agendula.ui.permission
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
@@ -1,10 +1,10 @@
|
||||
package de.jeanlucmakiola.floret.ui.permission
|
||||
package de.jeanlucmakiola.agendula.ui.permission
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import de.jeanlucmakiola.floret.data.tasks.ProviderResolver
|
||||
import de.jeanlucmakiola.floret.data.tasks.ProviderStatus
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.agendula.data.tasks.ProviderResolver
|
||||
import de.jeanlucmakiola.agendula.data.tasks.ProviderStatus
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepository
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.permission
|
||||
package de.jeanlucmakiola.agendula.ui.permission
|
||||
|
||||
import android.Manifest
|
||||
import android.os.Build
|
||||
@@ -21,10 +21,10 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
|
||||
/**
|
||||
* One-time onboarding step after the tasks-provider grant: explains that Floret
|
||||
* One-time onboarding step after the tasks-provider grant: explains that Agendula
|
||||
* delivers due reminders itself (tasks providers don't broadcast reminders) and
|
||||
* requests `POST_NOTIFICATIONS` (a system dialog on API 33+ only).
|
||||
*
|
||||
@@ -1,9 +1,9 @@
|
||||
package de.jeanlucmakiola.floret.ui.permission
|
||||
package de.jeanlucmakiola.agendula.ui.permission
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import de.jeanlucmakiola.floret.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.agendula.data.prefs.SettingsPrefs
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.map
|
||||
@@ -1,9 +1,9 @@
|
||||
package de.jeanlucmakiola.floret.ui.settings
|
||||
package de.jeanlucmakiola.agendula.ui.settings
|
||||
|
||||
import android.content.Context
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.core.os.LocaleListCompat
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import org.xmlpull.v1.XmlPullParser
|
||||
import java.util.Locale
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.settings
|
||||
package de.jeanlucmakiola.agendula.ui.settings
|
||||
|
||||
import android.Manifest
|
||||
import android.app.AlarmManager
|
||||
@@ -83,18 +83,18 @@ import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.floret.data.prefs.ListReminderOverride
|
||||
import de.jeanlucmakiola.floret.data.prefs.ThemeMode
|
||||
import de.jeanlucmakiola.floret.domain.TaskFormField
|
||||
import de.jeanlucmakiola.floret.ui.common.CollapsingScaffold
|
||||
import de.jeanlucmakiola.floret.ui.common.GroupedRow
|
||||
import de.jeanlucmakiola.floret.ui.common.OptionPicker
|
||||
import de.jeanlucmakiola.floret.ui.common.Position
|
||||
import de.jeanlucmakiola.floret.ui.common.ReminderLeadPicker
|
||||
import de.jeanlucmakiola.floret.ui.common.pastelize
|
||||
import de.jeanlucmakiola.floret.ui.common.positionOf
|
||||
import de.jeanlucmakiola.floret.ui.common.reminderLeadTimeLabel
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import de.jeanlucmakiola.agendula.data.prefs.ListReminderOverride
|
||||
import de.jeanlucmakiola.agendula.data.prefs.ThemeMode
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFormField
|
||||
import de.jeanlucmakiola.agendula.ui.common.CollapsingScaffold
|
||||
import de.jeanlucmakiola.agendula.ui.common.GroupedRow
|
||||
import de.jeanlucmakiola.agendula.ui.common.OptionPicker
|
||||
import de.jeanlucmakiola.agendula.ui.common.Position
|
||||
import de.jeanlucmakiola.agendula.ui.common.ReminderLeadPicker
|
||||
import de.jeanlucmakiola.agendula.ui.common.pastelize
|
||||
import de.jeanlucmakiola.agendula.ui.common.positionOf
|
||||
import de.jeanlucmakiola.agendula.ui.common.reminderLeadTimeLabel
|
||||
|
||||
/** The settings sub-screens reached from the hub's category rows. */
|
||||
private enum class SettingsSection { Appearance, TaskForm, Reminders }
|
||||
@@ -1,15 +1,15 @@
|
||||
package de.jeanlucmakiola.floret.ui.settings
|
||||
package de.jeanlucmakiola.agendula.ui.settings
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import de.jeanlucmakiola.floret.data.prefs.ListReminderOverride
|
||||
import de.jeanlucmakiola.floret.data.prefs.Settings
|
||||
import de.jeanlucmakiola.floret.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.floret.data.prefs.ThemeMode
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.floret.domain.TaskFormField
|
||||
import de.jeanlucmakiola.floret.domain.TaskList
|
||||
import de.jeanlucmakiola.agendula.data.prefs.ListReminderOverride
|
||||
import de.jeanlucmakiola.agendula.data.prefs.Settings
|
||||
import de.jeanlucmakiola.agendula.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.agendula.data.prefs.ThemeMode
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFormField
|
||||
import de.jeanlucmakiola.agendula.domain.TaskList
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.catch
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.tasklist
|
||||
package de.jeanlucmakiola.agendula.ui.tasklist
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
@@ -80,20 +80,20 @@ import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import de.jeanlucmakiola.floret.R
|
||||
import de.jeanlucmakiola.floret.domain.DayWindow
|
||||
import de.jeanlucmakiola.floret.domain.Priority
|
||||
import de.jeanlucmakiola.floret.domain.SmartList
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.floret.domain.TaskSection
|
||||
import de.jeanlucmakiola.floret.domain.TaskSections
|
||||
import de.jeanlucmakiola.floret.ui.common.ListNameChip
|
||||
import de.jeanlucmakiola.floret.ui.common.Position
|
||||
import de.jeanlucmakiola.floret.ui.common.PriorityChip
|
||||
import de.jeanlucmakiola.floret.ui.common.formatDateTime
|
||||
import de.jeanlucmakiola.floret.ui.common.pastelize
|
||||
import de.jeanlucmakiola.floret.ui.common.positionOf
|
||||
import de.jeanlucmakiola.agendula.R
|
||||
import de.jeanlucmakiola.agendula.domain.DayWindow
|
||||
import de.jeanlucmakiola.agendula.domain.Priority
|
||||
import de.jeanlucmakiola.agendula.domain.SmartList
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.domain.TaskSection
|
||||
import de.jeanlucmakiola.agendula.domain.TaskSections
|
||||
import de.jeanlucmakiola.agendula.ui.common.ListNameChip
|
||||
import de.jeanlucmakiola.agendula.ui.common.Position
|
||||
import de.jeanlucmakiola.agendula.ui.common.PriorityChip
|
||||
import de.jeanlucmakiola.agendula.ui.common.formatDateTime
|
||||
import de.jeanlucmakiola.agendula.ui.common.pastelize
|
||||
import de.jeanlucmakiola.agendula.ui.common.positionOf
|
||||
import java.time.ZoneId
|
||||
import kotlin.time.Clock
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package de.jeanlucmakiola.floret.ui.tasklist
|
||||
package de.jeanlucmakiola.agendula.ui.tasklist
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import de.jeanlucmakiola.floret.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.floret.domain.Task
|
||||
import de.jeanlucmakiola.floret.domain.TaskFilter
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksRepository
|
||||
import de.jeanlucmakiola.agendula.domain.Task
|
||||
import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.theme
|
||||
package de.jeanlucmakiola.agendula.ui.theme
|
||||
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
@@ -12,14 +12,14 @@ import androidx.compose.ui.graphics.Color
|
||||
*
|
||||
* Placeholder until branding lands; refine alongside the launcher icon.
|
||||
*/
|
||||
val FloretSeed: Color = Color(0xFF7A5C6B)
|
||||
val AgendulaSeed: Color = Color(0xFF7A5C6B)
|
||||
|
||||
/**
|
||||
* Fallback light scheme for devices without dynamic color (API < 31) or when
|
||||
* the user disables it. Dynamic color (API 31+) is the real path; these are a
|
||||
* hand-picked approximation of the tonal palette generated from [FloretSeed].
|
||||
* hand-picked approximation of the tonal palette generated from [AgendulaSeed].
|
||||
*/
|
||||
val FloretLightFallback = lightColorScheme(
|
||||
val AgendulaLightFallback = lightColorScheme(
|
||||
primary = Color(0xFF6A4E5B),
|
||||
onPrimary = Color(0xFFFFFFFF),
|
||||
primaryContainer = Color(0xFFF6D9E5),
|
||||
@@ -32,7 +32,7 @@ val FloretLightFallback = lightColorScheme(
|
||||
onSurface = Color(0xFF1F1A1C),
|
||||
)
|
||||
|
||||
val FloretDarkFallback = darkColorScheme(
|
||||
val AgendulaDarkFallback = darkColorScheme(
|
||||
primary = Color(0xFFE2BAC9),
|
||||
onPrimary = Color(0xFF402533),
|
||||
primaryContainer = Color(0xFF583B49),
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.theme
|
||||
package de.jeanlucmakiola.agendula.ui.theme
|
||||
|
||||
import android.os.Build
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
@@ -14,7 +14,7 @@ import androidx.compose.ui.platform.LocalContext
|
||||
* App theme. Honors:
|
||||
* - System light/dark.
|
||||
* - Dynamic Color on API 31+, else falls back to the hand-tuned scheme
|
||||
* derived from [FloretSeed].
|
||||
* derived from [AgendulaSeed].
|
||||
*
|
||||
* Mirrors Calendula's theme: MaterialExpressiveTheme routes all component +
|
||||
* custom motion through MaterialTheme.motionScheme. STANDARD over expressive()
|
||||
@@ -25,7 +25,7 @@ import androidx.compose.ui.platform.LocalContext
|
||||
*/
|
||||
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
|
||||
@Composable
|
||||
fun FloretTheme(
|
||||
fun AgendulaTheme(
|
||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
dynamicColor: Boolean = true,
|
||||
content: @Composable () -> Unit,
|
||||
@@ -35,13 +35,13 @@ fun FloretTheme(
|
||||
val ctx = LocalContext.current
|
||||
if (darkTheme) dynamicDarkColorScheme(ctx) else dynamicLightColorScheme(ctx)
|
||||
}
|
||||
darkTheme -> FloretDarkFallback
|
||||
else -> FloretLightFallback
|
||||
darkTheme -> AgendulaDarkFallback
|
||||
else -> AgendulaLightFallback
|
||||
}
|
||||
|
||||
MaterialExpressiveTheme(
|
||||
colorScheme = colorScheme,
|
||||
typography = FloretTypography,
|
||||
typography = AgendulaTypography,
|
||||
motionScheme = MotionScheme.standard(),
|
||||
content = content,
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.ui.theme
|
||||
package de.jeanlucmakiola.agendula.ui.theme
|
||||
|
||||
import androidx.compose.material3.Typography
|
||||
|
||||
@@ -7,4 +7,4 @@ import androidx.compose.material3.Typography
|
||||
* land in a later UI-design iteration; the defaults keep the M0 foundation lean
|
||||
* (same posture as Calendula's scaffolding).
|
||||
*/
|
||||
val FloretTypography = Typography()
|
||||
val AgendulaTypography = Typography()
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Floret launcher icon foreground — PLACEHOLDER.
|
||||
Agendula launcher icon foreground — PLACEHOLDER.
|
||||
|
||||
A simple rounded check mark inside the 108dp adaptive-icon canvas
|
||||
(72dp safe zone). Deliberately not Calendula's calendar mark, so the two
|
||||
apps never look alike. Replace with real branding (a stylized floret)
|
||||
apps never look alike. Replace with real branding (a stylized agendula)
|
||||
when the design lands — see docs/PLAN.md §9.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">Floret</string>
|
||||
<string name="app_name">Agendula</string>
|
||||
<string name="app_tagline">A modern Material 3 Expressive task app.\nComing into bloom.</string>
|
||||
|
||||
<!-- Generic -->
|
||||
@@ -136,19 +136,19 @@
|
||||
|
||||
<!-- Provider / permission onboarding -->
|
||||
<string name="onboarding_no_provider_title">A tasks app is needed</string>
|
||||
<string name="onboarding_no_provider_body">Floret shows and edits the tasks stored by OpenTasks or tasks.org, synced by DAVx5. Install one of them to get started.</string>
|
||||
<string name="onboarding_no_provider_body">Agendula shows and edits the tasks stored by OpenTasks or tasks.org, synced by DAVx5. Install one of them to get started.</string>
|
||||
<string name="onboarding_permission_title">Allow access to your tasks</string>
|
||||
<string name="onboarding_permission_body">Floret needs permission to read and write your tasks. That\'s the only thing it ever asks for.</string>
|
||||
<string name="onboarding_permission_body">Agendula needs permission to read and write your tasks. That\'s the only thing it ever asks for.</string>
|
||||
<string name="onboarding_permission_button">Grant task access</string>
|
||||
<string name="onboarding_install_opentasks">Install OpenTasks</string>
|
||||
<string name="onboarding_install_tasksorg">Install tasks.org</string>
|
||||
|
||||
<!-- Reminder onboarding (one-time, after the provider grant) -->
|
||||
<string name="reminder_onboarding_title">Never miss what\'s due</string>
|
||||
<string name="reminder_onboarding_body">Tasks apps don\'t send reminders themselves, so Floret delivers them for you. Turn them on to get a notification when a task is due.</string>
|
||||
<string name="reminder_onboarding_body">Tasks apps don\'t send reminders themselves, so Agendula delivers them for you. Turn them on to get a notification when a task is due.</string>
|
||||
<string name="reminder_onboarding_enable_button">Enable reminders</string>
|
||||
<string name="reminder_onboarding_skip_button">Not now</string>
|
||||
<string name="reminder_benefit_delivery_title">Floret reminds you</string>
|
||||
<string name="reminder_benefit_delivery_title">Agendula reminds you</string>
|
||||
<string name="reminder_benefit_delivery_body">It schedules a notification for each task with a due date.</string>
|
||||
<string name="reminder_benefit_timing_title">On your schedule</string>
|
||||
<string name="reminder_benefit_timing_body">Choose how far ahead to be reminded in Settings.</string>
|
||||
@@ -170,14 +170,14 @@
|
||||
<string name="settings_license">License</string>
|
||||
<string name="settings_about_support">Support development</string>
|
||||
<string name="settings_about_version">Version %1$s</string>
|
||||
<string name="settings_about_logo_desc">Floret app icon</string>
|
||||
<string name="settings_about_logo_desc">Agendula app icon</string>
|
||||
<string name="settings_language">App language</string>
|
||||
<string name="settings_language_auto">System default</string>
|
||||
<string name="settings_report_problem">Report a problem</string>
|
||||
<string name="settings_report_problem_hint">Open the issue tracker</string>
|
||||
<string name="about_source_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/floret</string>
|
||||
<string name="report_issue_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/floret/issues/new</string>
|
||||
<string name="about_license_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/floret/src/branch/main/LICENSE</string>
|
||||
<string name="about_source_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/agendula</string>
|
||||
<string name="report_issue_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/agendula/issues/new</string>
|
||||
<string name="about_license_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/agendula/src/branch/main/LICENSE</string>
|
||||
<string name="about_support_url" translatable="false">https://ko-fi.com/jeanlucmakiola</string>
|
||||
<string name="settings_theme">Theme</string>
|
||||
<string name="settings_theme_system">Follow system</string>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<style name="Theme.Floret" parent="android:Theme.Material.Light.NoActionBar">
|
||||
<style name="Theme.Agendula" parent="android:Theme.Material.Light.NoActionBar">
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
The languages Floret ships translations for. Single source of truth: each
|
||||
The languages Agendula ships translations for. Single source of truth: each
|
||||
entry needs a matching res/values-<tag>/strings.xml, and is surfaced in both
|
||||
the in-app language picker (parsed at runtime by AppLanguage) and the system
|
||||
per-app language settings (Android 13+, via android:localeConfig). To add a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
/** A [ColumnReader] backed by a Map, so mappers test without a real Cursor. */
|
||||
class MapColumnReader(private val values: Map<String, Any?>) : ColumnReader {
|
||||
@@ -1,11 +1,11 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Instances
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.floret.domain.Priority
|
||||
import de.jeanlucmakiola.floret.domain.TaskStatus
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Instances
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.agendula.domain.Priority
|
||||
import de.jeanlucmakiola.agendula.domain.TaskStatus
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class TaskMapperTest {
|
||||
@@ -1,10 +1,10 @@
|
||||
package de.jeanlucmakiola.floret.data.tasks
|
||||
package de.jeanlucmakiola.agendula.data.tasks
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.floret.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.floret.domain.Priority
|
||||
import de.jeanlucmakiola.floret.domain.TaskForm
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Lists
|
||||
import de.jeanlucmakiola.agendula.data.tasks.TasksContract.Tasks
|
||||
import de.jeanlucmakiola.agendula.domain.Priority
|
||||
import de.jeanlucmakiola.agendula.domain.TaskForm
|
||||
import org.junit.jupiter.api.Test
|
||||
import kotlin.time.Instant
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.jeanlucmakiola.floret.domain
|
||||
package de.jeanlucmakiola.agendula.domain
|
||||
|
||||
import kotlin.time.Instant
|
||||
|
||||
Reference in New Issue
Block a user