app/src/main/java/fr/neamar/kiss/result/Result.java
/**
     * Handler for popup menu action.
     * Default implementation only handle remove from history action.
     *
     * @return Works in the same way as onOptionsItemSelected, return true if the action has been handled, false otherwise
     */
Handler for popup menu action.
Default implementation only handle remove from history action.

@return Works in the same way as onOptionsItemSelected, return true if the action has been handled, false otherwise
Handler for popup menu action . Default implementation only handle remove from history action . @return Works in the same way as onOptionsItemSelected return true if the action has been handled false otherwise
boolean popupMenuClickHandler(Context context, RecordAdapter parent, @StringRes int stringId, View parentView) {
        switch (stringId) {
            case R.string.menu_remove:
                removeFromResultsAndHistory(context, parent);
                return true;
            case R.string.menu_favorites_add:
                launchAddToFavorites(context, pojo);
                break;
            case R.string.menu_favorites_remove:
                launchRemoveFromFavorites(context, pojo);
                break;
        }
        MainActivity mainActivity = (MainActivity) context;
        mainActivity.onFavoriteChange();
        mainActivity.launchOccurred();
        if (mainActivity.prefs.getBoolean("exclude-favorites", false) && mainActivity.isViewingSearchResults()) {
            mainActivity.updateSearchRecords(true);
        }
        return false;
    }
boolean popupMenuClickHandler ( Context context , RecordAdapter parent , @ StringRes int stringId , View parentView ) { switch ( stringId ) { case R . string . menu_remove : removeFromResultsAndHistory ( context , parent ) ; return true ; case R . string . menu_favorites_add : launchAddToFavorites ( context , pojo ) ; break ; case R . string . menu_favorites_remove : launchRemoveFromFavorites ( context , pojo ) ; break ; } MainActivity mainActivity = ( MainActivity ) context ; mainActivity . onFavoriteChange ( ) ; mainActivity . launchOccurred ( ) ; if ( mainActivity . prefs . getBoolean ( "exclude-favorites" , false ) && mainActivity . isViewingSearchResults ( ) ) { mainActivity . updateSearchRecords ( true ) ; } return false ; }
Handler for popup menu action.
Handler for popup menu action .
// Update favorite bar // Update Search to reflect favorite add, if the "exclude favorites" option is active