show a spinner while loading directories for the first time

This commit is contained in:
tibbi 2017-01-14 12:18:37 +01:00
parent 77c581e34d
commit c2f268d004

View file

@ -134,7 +134,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
val token = object : TypeToken<List<Directory>>() {}.type
val dirs = Gson().fromJson<ArrayList<Directory>>(config.directories, token) ?: ArrayList<Directory>(1)
gotDirectories(dirs)
if (dirs.size == 0) {
directories_holder.isRefreshing = true
} else {
gotDirectories(dirs)
}
mIsGettingDirs = true
GetDirectoriesAsynctask(applicationContext, mIsPickVideoIntent || mIsGetVideoContentIntent, mIsPickImageIntent || mIsGetImageContentIntent) {