feat: add long-term projects with AI creation
- Add project model, schema v4, sync triggers, and server support\n- Add project panel, deadline countdown, manual create/edit/complete/delete\n- Parse AI project operations and show them in the proposal diff\n- Sync projects to Android and display them read-only\n- Rebuild AppImage and update validation docs and screenshots
This commit is contained in:
@@ -26,6 +26,7 @@ import com.misaki.schedule.background.BackgroundScheduler
|
||||
import com.misaki.schedule.background.NotificationHelper
|
||||
import com.misaki.schedule.data.TimeUtils
|
||||
import com.misaki.schedule.sync.SyncManager
|
||||
import com.misaki.schedule.ui.ProjectAdapter
|
||||
import com.misaki.schedule.ui.ScheduleAdapter
|
||||
import com.misaki.schedule.ui.ScheduleDialog
|
||||
import com.misaki.schedule.ui.SettingsDialog
|
||||
@@ -39,7 +40,10 @@ class MainActivity : AppCompatActivity() {
|
||||
private lateinit var prefs: Prefs
|
||||
private lateinit var syncManager: SyncManager
|
||||
private lateinit var adapter: ScheduleAdapter
|
||||
private lateinit var projectAdapter: ProjectAdapter
|
||||
private lateinit var list: RecyclerView
|
||||
private lateinit var projectList: RecyclerView
|
||||
private lateinit var projectHeader: TextView
|
||||
private lateinit var emptyText: TextView
|
||||
private lateinit var dateText: TextView
|
||||
private lateinit var syncStatus: TextView
|
||||
@@ -69,6 +73,8 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
list = findViewById(R.id.scheduleList)
|
||||
projectList = findViewById(R.id.projectList)
|
||||
projectHeader = findViewById(R.id.projectHeader)
|
||||
emptyText = findViewById(R.id.emptyText)
|
||||
dateText = findViewById(R.id.dateText)
|
||||
syncStatus = findViewById(R.id.syncStatus)
|
||||
@@ -84,6 +90,9 @@ class MainActivity : AppCompatActivity() {
|
||||
)
|
||||
list.layoutManager = LinearLayoutManager(this)
|
||||
list.adapter = adapter
|
||||
projectAdapter = ProjectAdapter()
|
||||
projectList.layoutManager = LinearLayoutManager(this)
|
||||
projectList.adapter = projectAdapter
|
||||
|
||||
findViewById<FloatingActionButton>(R.id.addButton).setOnClickListener {
|
||||
val start = TimeUtils.defaultStart(selectedDate)
|
||||
@@ -168,6 +177,10 @@ class MainActivity : AppCompatActivity() {
|
||||
val items = repository.itemsForDate(selectedDate)
|
||||
adapter.submit(items)
|
||||
emptyText.visibility = if (items.isEmpty()) View.VISIBLE else View.GONE
|
||||
val projects = repository.projects()
|
||||
projectAdapter.submit(projects)
|
||||
projectHeader.visibility = if (projects.isEmpty()) View.GONE else View.VISIBLE
|
||||
projectList.visibility = if (projects.isEmpty()) View.GONE else View.VISIBLE
|
||||
}
|
||||
|
||||
private fun showScheduleDialog(item: ScheduleItem?, fallbackStart: java.time.LocalDateTime? = null) {
|
||||
|
||||
Reference in New Issue
Block a user