forked from mirrors/Fedilab
Some fixes
This commit is contained in:
parent
0ff17dd96f
commit
9959904853
8 changed files with 13 additions and 65 deletions
|
@ -1134,21 +1134,17 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
|
|
||||||
ComposeViewHolder holder = (ComposeViewHolder) viewHolder;
|
ComposeViewHolder holder = (ComposeViewHolder) viewHolder;
|
||||||
|
|
||||||
boolean displayEmoji = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_EMOJI), false);
|
|
||||||
if (displayEmoji) {
|
holder.binding.buttonEmojiOne.setVisibility(View.VISIBLE);
|
||||||
holder.binding.buttonEmojiOne.setVisibility(View.VISIBLE);
|
holder.binding.buttonEmojiOne.setOnClickListener(v -> {
|
||||||
holder.binding.buttonEmojiOne.setOnClickListener(v -> {
|
InputMethodManager imm = (InputMethodManager) context.getSystemService(INPUT_METHOD_SERVICE);
|
||||||
InputMethodManager imm = (InputMethodManager) context.getSystemService(INPUT_METHOD_SERVICE);
|
imm.hideSoftInputFromWindow(holder.binding.buttonEmojiOne.getWindowToken(), 0);
|
||||||
imm.hideSoftInputFromWindow(holder.binding.buttonEmojiOne.getWindowToken(), 0);
|
EmojiManager.install(new EmojiOneProvider());
|
||||||
EmojiManager.install(new EmojiOneProvider());
|
final EmojiPopup emojiPopup = EmojiPopup.Builder.fromRootView(holder.binding.buttonEmojiOne).setOnEmojiPopupDismissListener(() -> {
|
||||||
final EmojiPopup emojiPopup = EmojiPopup.Builder.fromRootView(holder.binding.buttonEmojiOne).setOnEmojiPopupDismissListener(() -> {
|
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
||||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
}).build(holder.binding.content);
|
||||||
}).build(holder.binding.content);
|
emojiPopup.toggle();
|
||||||
emojiPopup.toggle();
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
holder.binding.buttonEmojiOne.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int newInputType = holder.binding.content.getInputType() & (holder.binding.content.getInputType() ^ InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
|
int newInputType = holder.binding.content.getInputType() & (holder.binding.content.getInputType() ^ InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
|
||||||
holder.binding.content.setInputType(newInputType);
|
holder.binding.content.setInputType(newInputType);
|
||||||
|
|
|
@ -138,11 +138,6 @@ public class ConversationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
||||||
} else {
|
} else {
|
||||||
holder.binding.layoutFetchMore.fetchMoreContainer.setVisibility(View.GONE);
|
holder.binding.layoutFetchMore.fetchMoreContainer.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (conversation.cached) {
|
|
||||||
holder.binding.cacheIndicator.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
holder.binding.cacheIndicator.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
//---- SPOILER TEXT -----
|
//---- SPOILER TEXT -----
|
||||||
boolean expand_cw = sharedpreferences.getBoolean(context.getString(R.string.SET_EXPAND_CW), false);
|
boolean expand_cw = sharedpreferences.getBoolean(context.getString(R.string.SET_EXPAND_CW), false);
|
||||||
if (conversation.last_status.spoiler_text != null && !conversation.last_status.spoiler_text.trim().isEmpty()) {
|
if (conversation.last_status.spoiler_text != null && !conversation.last_status.spoiler_text.trim().isEmpty()) {
|
||||||
|
|
|
@ -217,11 +217,6 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
||||||
} else {
|
} else {
|
||||||
holderFollow.binding.layoutFetchMore.fetchMoreContainer.setVisibility(View.GONE);
|
holderFollow.binding.layoutFetchMore.fetchMoreContainer.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (notification.cached) {
|
|
||||||
holderFollow.binding.cacheIndicator.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
holderFollow.binding.cacheIndicator.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
} else if (getItemViewType(position) == TYPE_FILERED) {
|
} else if (getItemViewType(position) == TYPE_FILERED) {
|
||||||
StatusAdapter.StatusViewHolder holder = (StatusAdapter.StatusViewHolder) viewHolder;
|
StatusAdapter.StatusViewHolder holder = (StatusAdapter.StatusViewHolder) viewHolder;
|
||||||
holder.bindingFiltered.filteredText.setText(context.getString(R.string.filtered_by, notification.filteredByApp.title));
|
holder.bindingFiltered.filteredText.setText(context.getString(R.string.filtered_by, notification.filteredByApp.title));
|
||||||
|
|
|
@ -377,7 +377,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
boolean confirmFav = sharedpreferences.getBoolean(context.getString(R.string.SET_NOTIF_VALIDATION_FAV), false);
|
boolean confirmFav = sharedpreferences.getBoolean(context.getString(R.string.SET_NOTIF_VALIDATION_FAV), false);
|
||||||
boolean confirmBoost = sharedpreferences.getBoolean(context.getString(R.string.SET_NOTIF_VALIDATION), true);
|
boolean confirmBoost = sharedpreferences.getBoolean(context.getString(R.string.SET_NOTIF_VALIDATION), true);
|
||||||
boolean fullAttachement = sharedpreferences.getBoolean(context.getString(R.string.SET_FULL_PREVIEW), false);
|
boolean fullAttachement = sharedpreferences.getBoolean(context.getString(R.string.SET_FULL_PREVIEW), false);
|
||||||
boolean displayBookmark = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_BOOKMARK), false);
|
boolean displayBookmark = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_BOOKMARK), true);
|
||||||
boolean long_press_media = sharedpreferences.getBoolean(context.getString(R.string.SET_LONG_PRESS_STORE_MEDIA), false);
|
boolean long_press_media = sharedpreferences.getBoolean(context.getString(R.string.SET_LONG_PRESS_STORE_MEDIA), false);
|
||||||
boolean displayCounters = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_COUNTER_FAV_BOOST), false);
|
boolean displayCounters = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_COUNTER_FAV_BOOST), false);
|
||||||
String loadMediaType = sharedpreferences.getString(context.getString(R.string.SET_LOAD_MEDIA_TYPE), "ALWAYS");
|
String loadMediaType = sharedpreferences.getString(context.getString(R.string.SET_LOAD_MEDIA_TYPE), "ALWAYS");
|
||||||
|
@ -515,12 +515,6 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
holder.binding.actionButtonBoost.setActiveImageTint(R.color.boost_icon);
|
holder.binding.actionButtonBoost.setActiveImageTint(R.color.boost_icon);
|
||||||
holder.binding.actionButtonBookmark.setActiveImageTint(R.color.marked_icon);
|
holder.binding.actionButtonBookmark.setActiveImageTint(R.color.marked_icon);
|
||||||
|
|
||||||
if (status.cached) {
|
|
||||||
holder.binding.cacheIndicator.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
holder.binding.cacheIndicator.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (status.pinned) {
|
if (status.pinned) {
|
||||||
holder.binding.statusPinned.setVisibility(View.VISIBLE);
|
holder.binding.statusPinned.setVisibility(View.VISIBLE);
|
||||||
|
|
|
@ -37,16 +37,6 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="6dp">
|
android:padding="6dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/cache_indicator"
|
|
||||||
android:layout_width="16sp"
|
|
||||||
android:layout_height="16sp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:src="@drawable/ic_baseline_cached_24"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
@ -35,17 +35,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/cache_indicator"
|
|
||||||
android:layout_width="16sp"
|
|
||||||
android:layout_height="16sp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:src="@drawable/ic_baseline_storage_24"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
@ -649,17 +649,6 @@
|
||||||
app:sparkbutton_primaryColor="@color/marked_icon"
|
app:sparkbutton_primaryColor="@color/marked_icon"
|
||||||
app:sparkbutton_secondaryColor="@color/marked_icon" />
|
app:sparkbutton_secondaryColor="@color/marked_icon" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/cache_indicator"
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:layout_marginStart="12dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:contentDescription="@string/cached_messages"
|
|
||||||
android:src="@drawable/ic_baseline_storage_24"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
app:singleLineTitle="false"
|
app:singleLineTitle="false"
|
||||||
app:title="@string/set_share_validation" />
|
app:title="@string/set_share_validation" />
|
||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
android:defaultValue="false"
|
android:defaultValue="true"
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
app:key="@string/SET_DISPLAY_BOOKMARK"
|
app:key="@string/SET_DISPLAY_BOOKMARK"
|
||||||
app:singleLineTitle="false"
|
app:singleLineTitle="false"
|
||||||
|
|
Loading…
Reference in a new issue