mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: revert main tab reference change
reverts https://github.com/meshtastic/Meshtastic-Android/pull/844/commits/4add8f97da5cc24455fff5ed7c7a7e3064e3d534
This commit is contained in:
parent
3713d371fa
commit
6e83870295
4 changed files with 40 additions and 58 deletions
|
|
@ -27,7 +27,6 @@ import com.geeksville.mesh.database.PacketRepository
|
|||
import com.geeksville.mesh.repository.datastore.RadioConfigRepository
|
||||
import com.geeksville.mesh.repository.radio.RadioInterfaceService
|
||||
import com.geeksville.mesh.service.MeshService
|
||||
import com.geeksville.mesh.ui.MainTab
|
||||
import com.geeksville.mesh.util.positionToMeter
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -588,15 +587,15 @@ class UIViewModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private val _currentTab = MutableLiveData(MainTab.MESSAGES)
|
||||
val currentTab: LiveData<MainTab> get() = _currentTab
|
||||
private val _currentTab = MutableLiveData(0)
|
||||
val currentTab: LiveData<Int> get() = _currentTab
|
||||
|
||||
fun setCurrentTab(tab: MainTab) {
|
||||
fun setCurrentTab(tab: Int) {
|
||||
_currentTab.value = tab
|
||||
}
|
||||
|
||||
fun focusUserNode(node: NodeInfo?) {
|
||||
_currentTab.value = MainTab.USERS
|
||||
_currentTab.value = 1
|
||||
_focusedNode.value = node
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue