|
|
@@ -278,7 +278,7 @@ public class MainPresenter extends Presenter<MainModel, IMainView> {
|
|
|
scrollToFront();
|
|
|
break;
|
|
|
case Event.DIALOG:
|
|
|
- openLocationSettingDialog();
|
|
|
+ showPermissionCheckDialog();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -385,6 +385,7 @@ public class MainPresenter extends Presenter<MainModel, IMainView> {
|
|
|
else {
|
|
|
// permission denied -> nothing
|
|
|
// fixme 다시 묻지 않기 눌렀을 때 여기에서 멈춤
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
@@ -479,6 +480,33 @@ public class MainPresenter extends Presenter<MainModel, IMainView> {
|
|
|
home();
|
|
|
}
|
|
|
|
|
|
+ private void showPermissionCheckDialog() {
|
|
|
+ new DialogBuilder<ConfirmDialog, ICustomConfirmListener>(getFragmentManager(), DialogID.CONFIRM)
|
|
|
+ .listener(new ICustomConfirmListener<ConfirmDialog>() {
|
|
|
+ @Override
|
|
|
+ public void onPositiveResult(ConfirmDialog dialog, Event event) {
|
|
|
+ view.goSettingPermission();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onNegativeResult(ConfirmDialog dialog, Event event) {
|
|
|
+ dialog.dispose();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onDialogCanceled(ConfirmDialog dialog) {
|
|
|
+ dialog.dispose();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .attribute(dialog -> {
|
|
|
+ dialog.setTitleId(R.string.weather_permission_alert_title);
|
|
|
+ dialog.setText(ResourceUtil.getString(R.string.weather_permission_alert_contents));
|
|
|
+ dialog.setPositiveButtonLabelId(R.string.weather_permission_alert_positive);
|
|
|
+ dialog.setNegativeButtonLabelId(R.string.weather_permission_alert_negative);
|
|
|
+ })
|
|
|
+ .show();
|
|
|
+ }
|
|
|
+
|
|
|
private void showPromotionPopup() {
|
|
|
|
|
|
if (false == model.isVisiblePromotion() || null == model.getPromotionPopupBeans() || model.getPromotionPopupBeans().size() < 1) {
|