mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-26 16:25:25 +00:00
insta
This commit is contained in:
@@ -442,6 +442,9 @@ private fun ChatFloatingHeader(
|
|||||||
onLocationChannelsClick: () -> Unit,
|
onLocationChannelsClick: () -> Unit,
|
||||||
onLocationNotesClick: () -> Unit
|
onLocationNotesClick: () -> Unit
|
||||||
) {
|
) {
|
||||||
|
val context = androidx.compose.ui.platform.LocalContext.current
|
||||||
|
val locationManager = remember { com.bitchat.android.geohash.LocationChannelManager.getInstance(context) }
|
||||||
|
|
||||||
Surface(
|
Surface(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
@@ -466,7 +469,11 @@ private fun ChatFloatingHeader(
|
|||||||
onTripleClick = onPanicClear,
|
onTripleClick = onPanicClear,
|
||||||
onShowAppInfo = onShowAppInfo,
|
onShowAppInfo = onShowAppInfo,
|
||||||
onLocationChannelsClick = onLocationChannelsClick,
|
onLocationChannelsClick = onLocationChannelsClick,
|
||||||
onLocationNotesClick = onLocationNotesClick
|
onLocationNotesClick = {
|
||||||
|
// Ensure location is loaded before showing sheet
|
||||||
|
locationManager.refreshChannels()
|
||||||
|
onLocationNotesClick()
|
||||||
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
colors = TopAppBarDefaults.topAppBarColors(
|
colors = TopAppBarDefaults.topAppBarColors(
|
||||||
|
|||||||
@@ -573,8 +573,6 @@ fun LocationChannelsSheet(
|
|||||||
if (isPresented) {
|
if (isPresented) {
|
||||||
if (permissionState == LocationChannelManager.PermissionState.AUTHORIZED && locationServicesEnabled) {
|
if (permissionState == LocationChannelManager.PermissionState.AUTHORIZED && locationServicesEnabled) {
|
||||||
locationManager.refreshChannels()
|
locationManager.refreshChannels()
|
||||||
}
|
|
||||||
if (locationServicesEnabled) {
|
|
||||||
locationManager.beginLiveRefresh()
|
locationManager.beginLiveRefresh()
|
||||||
}
|
}
|
||||||
val geohashes = (availableChannels.map { it.geohash } + bookmarks).toSet().toList()
|
val geohashes = (availableChannels.map { it.geohash } + bookmarks).toSet().toList()
|
||||||
|
|||||||
Reference in New Issue
Block a user