|  | @@ -38,6 +38,7 @@ import com.cooleshow.base.utils.ToastUtil;
 | 
	
		
			
				|  |  |  import com.cooleshow.base.utils.UiUtils;
 | 
	
		
			
				|  |  |  import com.cooleshow.base.widgets.CommonItemDecoration;
 | 
	
		
			
				|  |  |  import com.cooleshow.base.widgets.EmptyViewLayout;
 | 
	
		
			
				|  |  | +import com.cooleshow.base.widgets.dialog.CommonDialog;
 | 
	
		
			
				|  |  |  import com.cooleshow.teacher.R;
 | 
	
		
			
				|  |  |  import com.cooleshow.teacher.adapter.MineStyleFansGroupListAdapter;
 | 
	
		
			
				|  |  |  import com.cooleshow.teacher.adapter.MineStyleVideoAdapter;
 | 
	
	
		
			
				|  | @@ -103,12 +104,14 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
 | 
	
		
			
				|  |  |      private String currentNickName;
 | 
	
		
			
				|  |  |      private String isReal;
 | 
	
		
			
				|  |  |      private String currentGander = "";
 | 
	
		
			
				|  |  | +    private boolean isModify = false;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public void onClick(View view) {
 | 
	
		
			
				|  |  |          switch (view.getId()) {
 | 
	
		
			
				|  |  |              case R.id.tv_select_fans:
 | 
	
		
			
				|  |  | +                isModify = true;
 | 
	
		
			
				|  |  |                  Bundle bundle = new Bundle();
 | 
	
		
			
				|  |  |                  bundle.putSerializable("selectTeachableInstrument", (Serializable) selectTeachableInstrument);
 | 
	
		
			
				|  |  |                  ARouter.getInstance().build(RouterPath.MineCenter.MINE_TEACHABLE_INSTRUMENT)
 | 
	
	
		
			
				|  | @@ -172,6 +175,7 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
 | 
	
		
			
				|  |  |                  break;
 | 
	
		
			
				|  |  |              case R.id.tv_edit_introduce:
 | 
	
		
			
				|  |  |                  //编辑个人介绍
 | 
	
		
			
				|  |  | +                isModify = true;
 | 
	
		
			
				|  |  |                  SoftKeyboardUtils.showSoftKeyboard(viewBinding.etSelfIntroduction);
 | 
	
		
			
				|  |  |                  if (!TextUtils.isEmpty(viewBinding.etSelfIntroduction.getText())) {
 | 
	
		
			
				|  |  |                      int length = viewBinding.etSelfIntroduction.getText().length();
 | 
	
	
		
			
				|  | @@ -302,6 +306,7 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
 | 
	
		
			
				|  |  |          teachableSelectAdapter = new TeachableSelectAdapter(selectTeachableInstrument);
 | 
	
		
			
				|  |  |          rvTopSelect.setAdapter(teachableSelectAdapter);
 | 
	
		
			
				|  |  |          teachableSelectAdapter.setOnItemClickListener((adapter, view, position) -> {
 | 
	
		
			
				|  |  | +            isModify = true;
 | 
	
		
			
				|  |  |              selectTeachableInstrument.remove(position);
 | 
	
		
			
				|  |  |              teachableSelectAdapter.notifyDataSetChanged();
 | 
	
		
			
				|  |  |          });
 | 
	
	
		
			
				|  | @@ -368,10 +373,17 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private void addETListener() {
 | 
	
		
			
				|  |  | +        etSelfIntroduction.setOnFocusChangeListener(new View.OnFocusChangeListener() {
 | 
	
		
			
				|  |  | +            @Override
 | 
	
		
			
				|  |  | +            public void onFocusChange(View v, boolean hasFocus) {
 | 
	
		
			
				|  |  | +                if(hasFocus){
 | 
	
		
			
				|  |  | +                    isModify = true;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |          etSelfIntroduction.addTextChangedListener(new TextWatcher() {
 | 
	
		
			
				|  |  |              @Override
 | 
	
		
			
				|  |  |              public void beforeTextChanged(CharSequence s, int start, int count, int after) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              @Override
 | 
	
	
		
			
				|  | @@ -449,6 +461,7 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
 | 
	
		
			
				|  |  |      public void upLoadVideoSuccess(TeacherSelfStyleInfoBean.StyleVideoBean styleVideoBean) {
 | 
	
		
			
				|  |  |          videoBeanList.add(0, styleVideoBean);
 | 
	
		
			
				|  |  |          isShowAuditTip = true;
 | 
	
		
			
				|  |  | +        isModify = true;
 | 
	
		
			
				|  |  |          mMineStyleVideoListAdapter.notifyDataSetChanged();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -468,6 +481,7 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
 | 
	
		
			
				|  |  |          if (currentUploadCoverPosition != -1 && currentUploadCoverPosition < videoBeanList.size()) {
 | 
	
		
			
				|  |  |              videoBeanList.get(currentUploadCoverPosition).cover = coverUrl;
 | 
	
		
			
				|  |  |              isShowAuditTip = true;
 | 
	
		
			
				|  |  | +            isModify = true;
 | 
	
		
			
				|  |  |              mMineStyleVideoListAdapter.notifyItemChanged(currentUploadCoverPosition);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -687,4 +701,38 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
 | 
	
		
			
				|  |  |                  .forResult(REQUEST_CODE_AVATAR);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    public void onBackPressed() {
 | 
	
		
			
				|  |  | +        if (isModify) {
 | 
	
		
			
				|  |  | +            showModifySaveTipDialog();
 | 
	
		
			
				|  |  | +            return;
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +            super.onBackPressed();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    private void showModifySaveTipDialog() {
 | 
	
		
			
				|  |  | +        CommonDialog commonDialog = new CommonDialog(this);
 | 
	
		
			
				|  |  | +        commonDialog.show();
 | 
	
		
			
				|  |  | +        commonDialog.setTitle("提示");
 | 
	
		
			
				|  |  | +        commonDialog.setContent("您尚未保存修改信息,返回后将取消修改");
 | 
	
		
			
				|  |  | +        commonDialog.setOnConfirmClickListener(new View.OnClickListener() {
 | 
	
		
			
				|  |  | +            @Override
 | 
	
		
			
				|  |  | +            public void onClick(View v) {
 | 
	
		
			
				|  |  | +                if (commonDialog != null) {
 | 
	
		
			
				|  |  | +                    commonDialog.dismiss();
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                finish();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +        commonDialog.setOnCancelClickListener(new View.OnClickListener() {
 | 
	
		
			
				|  |  | +            @Override
 | 
	
		
			
				|  |  | +            public void onClick(View v) {
 | 
	
		
			
				|  |  | +                if (commonDialog != null) {
 | 
	
		
			
				|  |  | +                    commonDialog.dismiss();
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |