File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ dependencies {
265265 api ' com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.8.0'
266266
267267 // Agora
268- implementation(" com.github.netless-io:whiteboard-android:nl_2.17.0-alpha.14 " ) {
268+ implementation(" com.github.netless-io:whiteboard-android:nl_2.17.0-alpha.15 " ) {
269269 force true
270270 }
271271 // for local fastboard debug
Original file line number Diff line number Diff line change 1+ here are what injected into build
2+ @netless/app-countdown@0.0.7
3+ @netless/app-dice@0.1.1
4+ @netless/app-geogebra@0.0.6
5+ @netless/app-iframe-bridge@0.0.2
6+ @netless/app-mindmap@0.1.1
7+ @netless/app-monaco@0.2.0-canary.1
8+ @netless/app-quill@0.1.1
9+ @netless/app-selector@0.0.3
Load diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ class AgoraBoardRoom @Inject constructor(
131131 override fun onFastError (error : FastException ) {
132132 if (error.code == FastException .ROOM_KICKED ) {
133133 boardError.value = BoardError .Kicked
134+ } else {
135+ // boardError.value = BoardError.Unknown(error.message ?: "Unknown error")
134136 }
135137 }
136138 })
@@ -140,6 +142,10 @@ class AgoraBoardRoom @Inject constructor(
140142 updateRoomController(writable)
141143 }
142144
145+ fastRoom?.setErrorHandler {
146+ logger.e(" [BOARD] error ${it.message} " )
147+ }
148+
143149 val fastResource = object : FastResource () {
144150 override fun getBackgroundColor (darkMode : Boolean ): Int {
145151 return ContextCompat .getColor(
Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ sealed class BoardPhase {
1010
1111sealed class BoardError {
1212 object Kicked : BoardError()
13+ data class Unknown (val message : String ) : BoardError()
1314}
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ class ExtComponent(
6666 showLoading(it.loading)
6767 it.error?.run {
6868 handleErrorMessage(it.error)
69+ viewModel.clearError()
6970 }
7071 }
7172 }
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import javax.inject.Inject
1919class ExtensionViewModel @Inject constructor(
2020 private val errorManager : RoomErrorManager ,
2121 private val boardRoom : AgoraBoardRoom ,
22- private val eventBus : EventBus
22+ private val eventBus : EventBus ,
2323) : ViewModel() {
2424 private val _state = MutableStateFlow (ExtensionState ())
2525 val state = _state .asStateFlow()
@@ -51,6 +51,10 @@ class ExtensionViewModel @Inject constructor(
5151 is BoardError .Kicked -> {
5252 eventBus.produceEvent(RoomKickedEvent )
5353 }
54+
55+ is BoardError .Unknown -> {
56+ _state .value = _state .value.copy(error = UiMessage (error.message))
57+ }
5458 }
5559 }
5660 }
@@ -61,6 +65,10 @@ class ExtensionViewModel @Inject constructor(
6165 }
6266 }
6367 }
68+
69+ fun clearError () {
70+ _state .value = _state .value.copy(error = null )
71+ }
6472}
6573
6674data class ExtensionState (
You can’t perform that action at this time.
0 commit comments