title: Toast message inside MutableLiveData.observe() working repeatedly
body: <p>I have a <a href="https://i.stack.imgur.com/uvpDK.png" rel="nofollow noreferrer">register form</a>  and ı want to show a message to the user based on signed up successfully or not.I store that message in my view model which has a mutable live data object to store that message and observing that object from my activity.My problem is when ı click to the register button first time it works normally,showing Toast with my message as expected but when ı click that button again Toast message show my message two times.I really didn't understand what's wrong with my code.Here is my code.</p>
  <p>RegisterActivity</p>
  <pre><code>  mViewModel = new ViewModelProvider(this, ViewModelProvider.AndroidViewModelFactory.getInstance(getApplication())).get(RegisterActivityViewModel.class);
    mRegisterBtn.setOnClickListener(v -&gt; {
          register();
      }); 
     private void register() {
      if (!GenericMethods.checkInputField(mKadi) || !GenericMethods.checkInputField(mEmail)
              || !GenericMethods.checkInputField(mPAss)) {
          Toast.makeText(this, &quot;Alanlar boş geçilemez&quot;, Toast.LENGTH_SHORT).show();
          return;
      }
      signup();
  }
      private void signup(){
      kAdi = mKadi.getText().toString().trim();
      email = mEmail.getText().toString().trim();
      parola = mPAss.getText().toString().trim();
      parolaTekrari = mValidpass.getText().toString().trim();
      il=mIlTv.getText().toString().trim();
      ilce=mIlceTv.getText().toString().trim();
      getRadioValue(mRadioGroup);
      üniversite=mUniTv.getText().toString().trim();
      User user = new User(kAdi,email,parola,cinsiyet,il,ilce,üniversite);
      mViewModel.signup(user);
      mViewModel.signupData.observe(this,status -&gt;{
         Toast.makeText(RegisterActivity.this, status, Toast.LENGTH_SHORT).show();
     });
  }
  </code></pre>
  <p>RegisterActivityViewModel</p>
  <pre><code>public MutableLiveData&lt;String&gt; signupData = new MutableLiveData&lt;&gt;();
  
  private String statusString=null;
  
  public void fetchFromRemote() {
      isLoading.setValue(true);
      disposable.add(RetroService.getInstance().getIller()
              .subscribeOn(Schedulers.io())
              .observeOn(AndroidSchedulers.mainThread())
              .subscribeWith(new DisposableSingleObserver&lt;List&lt;Response&gt;&gt;() {
                  @Override
                  public void onSuccess(@NonNull List&lt;Response&gt; responses) {
                      isLoading.setValue(false);
                      adresList.setValue(responses);
                  }
                  @Override
                  public void onError(@NonNull Throwable e) {
                      isLoading.setValue(false);
                  }
              }));
  }
  
  public void signup(User user) {
      Repo.getInstance().signup(user)
              .enqueue(new Callback&lt;Void&gt;() {
                  @Override
                  public void onResponse(Call&lt;Void&gt; call, retrofit2.Response&lt;Void&gt; response) {
  
                      if (response.code() == 200) {
                      statusString=&quot;Success!&quot;;
                      } else if (response.code() == 400) {
                      statusString=&quot;email already exists&quot;;
                      }
                      signupData.setValue(statusString);
                  }
                  @Override
                  public void onFailure(Call&lt;Void&gt; call, Throwable t) {
                      signupData.setValue(t.getMessage());
                  }
              });
  
  }
  
  @Override
  protected void onCleared() {
      super.onCleared();
      disposable.clear();
  }
  </code></pre>