Apply the fix on click

This commit is contained in:
tom79 2019-06-10 18:38:44 +02:00
parent fc66974cf4
commit eaba8b6842
1 changed files with 14 additions and 7 deletions

View File

@ -1025,35 +1025,42 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.custom_feature_translate.setOnClickListener(view -> { holder.custom_feature_translate.setOnClickListener(view -> {
translateToot(status); translateToot(status);
holder.fedilab_features_panel.setVisibility(View.GONE); status.setCustomFeaturesDisplayed(false);
notifyStatusChanged(status);
}); });
holder.custom_feature_bookmark.setOnClickListener(view -> { holder.custom_feature_bookmark.setOnClickListener(view -> {
bookmark(status); bookmark(status);
holder.fedilab_features_panel.setVisibility(View.GONE); status.setCustomFeaturesDisplayed(false);
notifyStatusChanged(status);
}); });
holder.custom_feature_bookmark.setOnLongClickListener(view -> { holder.custom_feature_bookmark.setOnLongClickListener(view -> {
CrossActions.doCrossBookmark(context, status, statusListAdapter); CrossActions.doCrossBookmark(context, status, statusListAdapter);
holder.fedilab_features_panel.setVisibility(View.GONE); status.setCustomFeaturesDisplayed(false);
notifyStatusChanged(status);
return false; return false;
}); });
holder.custom_feature_timed_mute.setOnClickListener(view -> { holder.custom_feature_timed_mute.setOnClickListener(view -> {
timedMuteAction(status); timedMuteAction(status);
holder.fedilab_features_panel.setVisibility(View.GONE); status.setCustomFeaturesDisplayed(false);
notifyStatusChanged(status);
}); });
holder.custom_feature_schedule.setOnClickListener(view -> { holder.custom_feature_schedule.setOnClickListener(view -> {
scheduleBoost(status); scheduleBoost(status);
holder.fedilab_features_panel.setVisibility(View.GONE); status.setCustomFeaturesDisplayed(false);
notifyStatusChanged(status);
}); });
holder.custom_feature_mention.setOnClickListener(view -> { holder.custom_feature_mention.setOnClickListener(view -> {
mention(status); mention(status);
holder.fedilab_features_panel.setVisibility(View.GONE); status.setCustomFeaturesDisplayed(false);
notifyStatusChanged(status);
}); });
holder.custom_feature_cache.setOnClickListener(view -> { holder.custom_feature_cache.setOnClickListener(view -> {
new ManageCachedStatusAsyncTask(context, status.getId(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new ManageCachedStatusAsyncTask(context, status.getId(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
holder.fedilab_features_panel.setVisibility(View.GONE); status.setCustomFeaturesDisplayed(false);
notifyStatusChanged(status);
}); });
} }