mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: implement repository pattern for NodeDB (#835)
- enforce Unidirectional Data Flow removing nodeDB updates via `MainActivity`/`UIState` - merge `MyNodeInfoDao` into `NodeInfoDao` - move node list re-indexing to database
This commit is contained in:
parent
3f0dfb7690
commit
c8f93db00d
10 changed files with 170 additions and 147 deletions
|
|
@ -2,7 +2,6 @@ package com.geeksville.mesh.database
|
|||
|
||||
import android.app.Application
|
||||
import com.geeksville.mesh.database.dao.MeshLogDao
|
||||
import com.geeksville.mesh.database.dao.MyNodeInfoDao
|
||||
import com.geeksville.mesh.database.dao.NodeInfoDao
|
||||
import com.geeksville.mesh.database.dao.PacketDao
|
||||
import com.geeksville.mesh.database.dao.QuickChatActionDao
|
||||
|
|
@ -20,11 +19,6 @@ class DatabaseModule {
|
|||
fun provideDatabase(app: Application): MeshtasticDatabase =
|
||||
MeshtasticDatabase.getDatabase(app)
|
||||
|
||||
@Provides
|
||||
fun provideMyNodeInfoDao(database: MeshtasticDatabase): MyNodeInfoDao {
|
||||
return database.myNodeInfoDao()
|
||||
}
|
||||
|
||||
@Provides
|
||||
fun provideNodeInfoDao(database: MeshtasticDatabase): NodeInfoDao {
|
||||
return database.nodeInfoDao()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue