code: @UiThread
      public void removeObjectSync(T object) {
          //To make sure all the appropriate callbacks happen, we just want to piggyback on the
          //existing code that handles deleting spans when the text changes
          ArrayList<Editable>texts = new ArrayList<>();
          //If there is hidden content, it's important that we update it first
          if (hiddenContent != null) {
              texts.add(hiddenContent);
          }
          if (getText() != null) {
              texts.add(getText());
          }
  
          // If the object is currently visible, remove it
          for (Editable text: texts) {
              TokenImageSpan[] spans = text.getSpans(0, text.length(), TokenImageSpan.class);
              for (TokenImageSpan span : spans) {
                  if (span.getToken().equals(object)) {
                      removeSpan(text, span);
                  }
              }
          }
  
          updateCountSpan();
      }
docs: Remove an object from the token list. Will remove duplicates if present or do nothing if no
  object is present in the view. Uses {@link Object#equals(Object)} to find objects. May only
  be called from the main thread
  
  @param object object to remove, may be null or not in the view