diff options
author | pacien | 2017-09-06 14:33:47 +0200 |
---|---|---|
committer | pacien | 2017-09-06 14:33:47 +0200 |
commit | 9e5aa1a9f95a3b5541aba7e511e13ae51b614416 (patch) | |
tree | 248b00729a22bcf26781fbdcaac5a99dc2b9adbc | |
parent | d4fe2c8f1c969465f0e71aadbc9deb65ed463bc5 (diff) | |
download | tincapp-9e5aa1a9f95a3b5541aba7e511e13ae51b614416.tar.gz |
Do not crash on unreadable config. dir
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt index 6ef8974..3163f0a 100644 --- a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt +++ b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt | |||
@@ -68,7 +68,7 @@ class StartActivity : BaseActivity(), AdapterView.OnItemClickListener, SwipeRefr | |||
68 | } | 68 | } |
69 | 69 | ||
70 | override fun onRefresh() { | 70 | override fun onRefresh() { |
71 | val networks = AppPaths.confDir().list().toList() | 71 | val networks = AppPaths.confDir().list()?.toList() ?: emptyList() |
72 | runOnUiThread { | 72 | runOnUiThread { |
73 | networkListAdapter?.setElements(networks) | 73 | networkListAdapter?.setElements(networks) |
74 | network_list_placeholder.visibility = if (networkListAdapter?.isEmpty ?: true) View.VISIBLE else View.GONE | 74 | network_list_placeholder.visibility = if (networkListAdapter?.isEmpty ?: true) View.VISIBLE else View.GONE |