title: RxJava2 get event when Observable/Completed is completed or disposed
body: <p>I need to show a progress dialog when I subscribe to a <code>Completable</code> and hide it after the operation is completed(successfully or with an error) or is canceled.</p>
  
  <p>So I do </p>
  
  <pre><code>final Completable completable = notificationRepository.markAllAsRead()
          .doOnSubscribe(d -&gt; progressDialog.show())
          .doOnError(error -&gt; progressDialog.dismiss())
          .doOnComplete(() -&gt; progressDialog.dismiss())
          .doOnDispose(() -&gt; progressDialog.dismiss());
  </code></pre>
  
  <p>Is there any elegant way to get single callback when 
  <code>onError</code>, <code>onComplete</code> or <code>onDispose</code> happens?</p>