mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
create Room database for DataPacket
This commit is contained in:
parent
9427eec72f
commit
ab7bf4922b
8 changed files with 168 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ package com.geeksville.mesh.database
|
|||
|
||||
import android.app.Application
|
||||
import com.geeksville.mesh.database.dao.MeshLogDao
|
||||
import com.geeksville.mesh.database.dao.PacketDao
|
||||
import com.geeksville.mesh.database.dao.QuickChatActionDao
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
|
|
@ -17,6 +18,11 @@ class DatabaseModule {
|
|||
fun provideDatabase(app: Application): MeshtasticDatabase =
|
||||
MeshtasticDatabase.getDatabase(app)
|
||||
|
||||
@Provides
|
||||
fun providePacketDao(database: MeshtasticDatabase): PacketDao {
|
||||
return database.packetDao()
|
||||
}
|
||||
|
||||
@Provides
|
||||
fun provideMeshLogDao(database: MeshtasticDatabase): MeshLogDao {
|
||||
return database.meshLogDao()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue