mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 05:25:20 +00:00
refresh peer list more often
This commit is contained in:
@@ -81,6 +81,7 @@ class WifiAwareMeshService(private val context: Context) : MeshService, Transpor
|
||||
field = value
|
||||
if (::meshCore.isInitialized) {
|
||||
meshCore.delegate = value
|
||||
meshCore.refreshPeerList()
|
||||
}
|
||||
}
|
||||
private val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
@@ -114,6 +115,9 @@ class WifiAwareMeshService(private val context: Context) : MeshService, Transpor
|
||||
try { meshCore.gossipSyncManager.scheduleInitialSyncToPeer(pid, 1_000) } catch (_: Exception) { }
|
||||
}
|
||||
},
|
||||
announcementNicknameProvider = {
|
||||
try { com.bitchat.android.services.NicknameProvider.getNickname(context, myPeerID) } catch (_: Exception) { null }
|
||||
},
|
||||
leavePayloadProvider = {
|
||||
(delegate?.getNickname() ?: myPeerID).toByteArray(Charsets.UTF_8)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user