Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
610 B
4
Indexable
Never
    fun init(args: FilesFragmentArgs) {
        this.args = args
        val parentFolder = args.parentFolder
        val storage = args.storage ?: parentFolder?.storage
        if (storage != null) {
            currentStorage.value = storage
        }

        val isRoot = parentFolder == null
        val isPersonalFolder = this.parentFolder.value != null && this.parentFolder.value == this.personalFolder.value
        val preservePersonalRoot = isPersonalFolder && isRoot
        if (!preservePersonalRoot) {
            this.parentFolder.value = parentFolder
        }

        ...
    }