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:
Andre K 2024-02-06 20:03:15 -03:00 committed by GitHub
parent 3f0dfb7690
commit c8f93db00d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 170 additions and 147 deletions

View file

@ -10,7 +10,6 @@ import com.geeksville.mesh.MyNodeInfo
import com.geeksville.mesh.NodeInfo
import com.geeksville.mesh.database.dao.PacketDao
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.QuickChatActionDao
import com.geeksville.mesh.database.entity.MeshLog
@ -33,7 +32,6 @@ import com.geeksville.mesh.database.entity.QuickChatAction
)
@TypeConverters(Converters::class)
abstract class MeshtasticDatabase : RoomDatabase() {
abstract fun myNodeInfoDao(): MyNodeInfoDao
abstract fun nodeInfoDao(): NodeInfoDao
abstract fun packetDao(): PacketDao
abstract fun meshLogDao(): MeshLogDao