mirror of
https://github.com/KokaKiwi/BarInsta
synced 2026-03-14 16:31:36 +00:00
Set dm colors for Light themes. Also some dm fixes.
This commit is contained in:
parent
6bed9bf28c
commit
926ebca9e9
15 changed files with 68 additions and 13 deletions
|
|
@ -18,7 +18,6 @@ import awais.instagrabber.adapters.DirectItemsAdapter.DirectItemCallback;
|
|||
import awais.instagrabber.databinding.LayoutDmBaseBinding;
|
||||
import awais.instagrabber.databinding.LayoutDmProfileBinding;
|
||||
import awais.instagrabber.models.enums.DirectItemType;
|
||||
import awais.instagrabber.repositories.responses.ImageVersions2;
|
||||
import awais.instagrabber.repositories.responses.Location;
|
||||
import awais.instagrabber.repositories.responses.Media;
|
||||
import awais.instagrabber.repositories.responses.User;
|
||||
|
|
@ -97,7 +96,13 @@ public class DirectItemProfileViewHolder extends DirectItemViewHolder {
|
|||
if (profile == null) return;
|
||||
binding.profilePic.setImageURI(profile.getProfilePicUrl());
|
||||
binding.username.setText(profile.getUsername());
|
||||
binding.fullName.setText(profile.getFullName());
|
||||
final String fullName = profile.getFullName();
|
||||
if (!TextUtils.isEmpty(fullName)) {
|
||||
binding.fullName.setVisibility(View.VISIBLE);
|
||||
binding.fullName.setText(fullName);
|
||||
} else {
|
||||
binding.fullName.setVisibility(View.GONE);
|
||||
}
|
||||
binding.isVerified.setVisibility(profile.isVerified() ? View.VISIBLE : View.GONE);
|
||||
itemView.setOnClickListener(v -> openProfile(profile.getUsername()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package awais.instagrabber.customviews.masoudss_waveform;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapShader;
|
||||
import android.graphics.Canvas;
|
||||
|
|
@ -50,8 +51,21 @@ public final class WaveformSeekBar extends View {
|
|||
|
||||
public WaveformSeekBar(final Context context, @Nullable final AttributeSet attrs, final int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
this.waveBackgroundColor = context.getResources().getColor(R.color.white);
|
||||
this.waveProgressColor = context.getResources().getColor(R.color.blue_800);
|
||||
final TypedArray a = context.getTheme().obtainStyledAttributes(
|
||||
attrs,
|
||||
R.styleable.WaveformSeekBar,
|
||||
0,
|
||||
0);
|
||||
final int backgroundColor;
|
||||
final int progressColor;
|
||||
try {
|
||||
backgroundColor = a.getResourceId(R.styleable.WaveformSeekBar_waveformBackgroundColor, R.color.white);
|
||||
progressColor = a.getResourceId(R.styleable.WaveformSeekBar_waveformProgressColor, R.color.blue_800);
|
||||
} finally {
|
||||
a.recycle();
|
||||
}
|
||||
this.waveBackgroundColor = context.getResources().getColor(backgroundColor);
|
||||
this.waveProgressColor = context.getResources().getColor(progressColor);
|
||||
}
|
||||
|
||||
private float getSampleMax() {
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ public class DirectMessageSettingsFragment extends Fragment implements ConfirmDi
|
|||
viewModel.isViewerAdmin().observe(getViewLifecycleOwner(), this::setApprovalRelatedUI);
|
||||
viewModel.getApprovalRequiredToJoin().observe(getViewLifecycleOwner(), required -> binding.approvalRequired.setChecked(required));
|
||||
viewModel.getPendingRequests().observe(getViewLifecycleOwner(), this::setPendingRequests);
|
||||
viewModel.isGroup().observe(getViewLifecycleOwner(), this::setupSettings);
|
||||
final NavController navController = NavHostFragment.findNavController(this);
|
||||
final NavBackStackEntry backStackEntry = navController.getCurrentBackStackEntry();
|
||||
if (backStackEntry != null) {
|
||||
|
|
@ -207,13 +208,11 @@ public class DirectMessageSettingsFragment extends Fragment implements ConfirmDi
|
|||
}
|
||||
|
||||
private void init() {
|
||||
setupSettings();
|
||||
// setupSettings();
|
||||
setupMembers();
|
||||
}
|
||||
|
||||
private void setupSettings() {
|
||||
Boolean isGroup = viewModel.isGroup().getValue();
|
||||
if (isGroup == null) isGroup = false;
|
||||
private void setupSettings(final boolean isGroup) {
|
||||
binding.groupSettings.setVisibility(isGroup ? View.VISIBLE : View.GONE);
|
||||
binding.muteMessagesLabel.setOnClickListener(v -> binding.muteMessages.toggle());
|
||||
binding.muteMessages.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
|
|
|
|||
|
|
@ -1227,7 +1227,10 @@ public class DirectMessageThreadFragment extends Fragment implements DirectReact
|
|||
if (!isEmojiPickerShown) {
|
||||
binding.emojiPicker.setAlpha(0);
|
||||
}
|
||||
imm.showSoftInput(binding.input, InputMethodManager.SHOW_IMPLICIT);
|
||||
final boolean shown = imm.showSoftInput(binding.input, InputMethodManager.SHOW_IMPLICIT);
|
||||
if (!shown) {
|
||||
Log.e(TAG, "showKeyboard: System did not display the keyboard");
|
||||
}
|
||||
if (!isEmojiPickerShown) {
|
||||
animatePan(keyboardHeight);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue