修改设置图片后背景图片数据丢失问题。
This commit is contained in:
@@ -322,6 +322,7 @@ public class MainViewFragment extends Fragment {
|
||||
|
||||
public void reloadBackground() {
|
||||
BackgroundSourceUtils utils = BackgroundSourceUtils.getInstance(getActivity());
|
||||
mBgSourceUtils.loadSettings();
|
||||
BackgroundBean bean = utils.getCurrentBackgroundBean();
|
||||
mBackgroundView.loadBackground(bean);
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ public class BackgroundSourceUtils {
|
||||
/**
|
||||
* 加载背景图片配置数据(核心:确保current/preview是两份独立的BackgroundBean实例)
|
||||
*/
|
||||
void loadSettings() {
|
||||
public void loadSettings() {
|
||||
// 1. 加载正式Bean(独立实例:从currentBackgroundBean.json加载,不存在则新建)
|
||||
currentBackgroundBean = BackgroundBean.loadBeanFromFile(currentBackgroundBeanFile.getAbsolutePath(), BackgroundBean.class);
|
||||
if (currentBackgroundBean == null) {
|
||||
|
||||
Reference in New Issue
Block a user