Skip to content

SharedPreferences写入有时候没有生效 #12

@LinkZhang

Description

@LinkZhang

发现有的手机环境切换没有生效,后来发现SharedPreferences的写入操作用的是apply(),这个方法是异步的,所有存在写入没有完成,就回调onEnvironmentChange方法,建议改成commit()方法,执行成功再回调

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions