Merge remote-tracking branch 'origin/develop_new' into develop_new
This commit is contained in:
@@ -55,7 +55,9 @@ public class NoticeSettingActivity extends BaseActivity {
|
||||
ButterKnife.bind(this);
|
||||
initTitleBar(R.string.notice_setting);
|
||||
|
||||
userExpand = UserModel.get().getUserExpand();
|
||||
userExpand = new UserInfo.Location();
|
||||
userExpand.setInteractiveMsgNotify(false);
|
||||
userExpand.setSysMsgNotify(true);
|
||||
if (userExpand == null) {
|
||||
return;
|
||||
}
|
||||
@@ -100,37 +102,37 @@ public class NoticeSettingActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
|
||||
if (communityNoticeView == null) {
|
||||
communityNoticeView = LayoutInflater.from(context).inflate(R.layout.item_system_notice, null);
|
||||
switchCommunityNotice = communityNoticeView.findViewById(R.id.switch_notice);
|
||||
llContainer.addView(communityNoticeView, new ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
getResources().getDimensionPixelOffset(R.dimen.dp_setting_sys_notice_item_height))
|
||||
);
|
||||
setName(communityNoticeView, "互动通知");
|
||||
setDesc(communityNoticeView, "关闭后,收到动态互动消息不再提示");
|
||||
}
|
||||
switchCommunityNotice.setOn(userExpand.isInteractiveMsgNotify());
|
||||
|
||||
switchCommunityNotice.setOnSwitchStateChangeListener(new IOSSwitchView.OnSwitchStateChangeListener() {
|
||||
@Override
|
||||
public void onStateSwitched(boolean isOn) {
|
||||
SettingsModel.get().interactiveMsgNotify(isOn)
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(new DontWarnObserver<String>() {
|
||||
@Override
|
||||
public void accept(String s, String error) {
|
||||
super.accept(s, error);
|
||||
if (error == null) {
|
||||
userExpand.setInteractiveMsgNotify(isOn);
|
||||
} else {
|
||||
toast(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
// if (communityNoticeView == null) {
|
||||
// communityNoticeView = LayoutInflater.from(context).inflate(R.layout.item_system_notice, null);
|
||||
// switchCommunityNotice = communityNoticeView.findViewById(R.id.switch_notice);
|
||||
// llContainer.addView(communityNoticeView, new ViewGroup.LayoutParams(
|
||||
// ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
// getResources().getDimensionPixelOffset(R.dimen.dp_setting_sys_notice_item_height))
|
||||
// );
|
||||
// setName(communityNoticeView, "互动通知");
|
||||
// setDesc(communityNoticeView, "关闭后,收到动态互动消息不再提示");
|
||||
// }
|
||||
// switchCommunityNotice.setOn(userExpand.isInteractiveMsgNotify());
|
||||
//
|
||||
// switchCommunityNotice.setOnSwitchStateChangeListener(new IOSSwitchView.OnSwitchStateChangeListener() {
|
||||
// @Override
|
||||
// public void onStateSwitched(boolean isOn) {
|
||||
// SettingsModel.get().interactiveMsgNotify(isOn)
|
||||
// .compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
// .subscribe(new DontWarnObserver<String>() {
|
||||
// @Override
|
||||
// public void accept(String s, String error) {
|
||||
// super.accept(s, error);
|
||||
// if (error == null) {
|
||||
// userExpand.setInteractiveMsgNotify(isOn);
|
||||
// } else {
|
||||
// toast(error);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
@@ -113,6 +113,7 @@
|
||||
android:background="@drawable/icon_bg_number_default"
|
||||
android:gravity="center|center_vertical"
|
||||
android:textSize="10sp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/white_transparent_50"
|
||||
tools:text="1"/>
|
||||
|
||||
|
@@ -100,6 +100,7 @@
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:includeFontPadding="false"
|
||||
android:background="@drawable/icon_bg_number_default"
|
||||
android:gravity="center|center_vertical"
|
||||
android:textColor="@color/white_transparent_50"
|
||||
|
@@ -133,6 +133,7 @@
|
||||
android:background="@drawable/icon_bg_number_default"
|
||||
android:gravity="center|center_vertical"
|
||||
android:textSize="10sp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/white_transparent_50"
|
||||
tools:text="1"/>
|
||||
|
||||
|
Reference in New Issue
Block a user