Skip to content

Commit

Permalink
Update how we subscribe to app events
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Jun 21, 2024
1 parent 556a1f3 commit fc9a764
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class MainActivity : FlutterActivity(), MethodChannel.MethodCallHandler,
}
EventHandler.subscribeAppEvents { appEvent ->
when (appEvent) {
is AppEvent.AccountInitializationEvent -> onInitializingAccount(appEvent.status)
is AppEvent.BandwidthEvent -> {
val event = appEvent as AppEvent.BandwidthEvent
Logger.debug("bandwidth updated", event.bandwidth.toString())
Expand Down Expand Up @@ -245,7 +246,6 @@ class MainActivity : FlutterActivity(), MethodChannel.MethodCallHandler,
fetch { loconf -> runOnUiThread { processLoconf(loconf) } }
}

//@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
fun onInitializingAccount(status: AccountInitializationStatus) {
val appName = getString(R.string.app_name)

Expand Down

0 comments on commit fc9a764

Please sign in to comment.