docs: @SuppressWarnings("WeakerAccess")
      @UiThread
      public void replaceTopController(@NonNull RouterTransaction transaction) {
          ThreadUtils.ensureMainThread();
  
          RouterTransaction topTransaction = backstack.peek();
          if (!backstack.isEmpty()) {
              trackDestroyingController(backstack.pop());
          }
  
          final ControllerChangeHandler handler = transaction.pushChangeHandler();
          if (topTransaction != null) {
              //noinspection ConstantConditions
              final boolean oldHandlerRemovedViews = topTransaction.pushChangeHandler() == null || topTransaction.pushChangeHandler().removesFromViewOnPush();
              final boolean newHandlerRemovesViews = handler == null || handler.removesFromViewOnPush();
              if (!oldHandlerRemovedViews && newHandlerRemovesViews) {
                  for (RouterTransaction visibleTransaction : getVisibleTransactions(backstack.iterator())) {
                      performControllerChange(null, visibleTransaction, true, handler);
                  }
              }
          }
  
          pushToBackstack(transaction);
  
          if (handler != null) {
              handler.setForceRemoveViewOnPush(true);
          }
          performControllerChange(transaction.pushChangeHandler(handler), topTransaction, true);
      }