package net.micode.notes.ui.page.mvi

import androidx.activity.viewModels
import com.android.architecture.extension.binding
import net.micode.notes.app.AppActivity
import net.micode.notes.databinding.ActivityNotesBinding
import net.micode.notes.domain.event.MviMessages
import net.micode.notes.domain.message.PageMessenger

class NotesActivity : AppActivity() {   //安全文件夹部分

    private val binding: ActivityNotesBinding by binding()
    private val messenger by viewModels<PageMessenger>()

    override fun isStatusBarEnabled(): Boolean {
        return false
    }

    override fun initView() {
        setContentView(binding.root)
    }

    override fun input() {
    }

    override fun output() {
        messenger.output(this) {
            if (it is MviMessages.FinishActivity) {
                finish()
            }
        }
    }

}