summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.kt
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-03-27 15:16:30 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-03-27 15:38:04 +0530
commit536a6f3f83ad25df65114581d5dde36a8e74ed98 (patch)
tree2ab8d93f6e48460f34d9e321af250c96ecef1fe4 /ui/src/main/java/com/wireguard/android/fragment/BaseFragment.kt
parentb9fd3d37f24b8def4fe35e005672454912a5024a (diff)
ui: Replace ErrorMessages getter with indexing operator
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/src/main/java/com/wireguard/android/fragment/BaseFragment.kt')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/BaseFragment.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.kt
index 0f7c5802..d072bc69 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.kt
@@ -87,7 +87,7 @@ abstract class BaseFragment : Fragment(), OnSelectedTunnelChangedListener {
private fun setTunnelStateWithPermissionsResult(tunnel: ObservableTunnel, checked: Boolean) {
tunnel.setStateAsync(Tunnel.State.of(checked)).whenComplete { _, throwable ->
if (throwable == null) return@whenComplete
- val error = ErrorMessages.get(throwable)
+ val error = ErrorMessages[throwable]
val messageResId = if (checked) R.string.error_up else R.string.error_down
val message = requireContext().getString(messageResId, error)
val view = view