From 622363c2c67cc11ebf31dd2b5a0431632d4c8b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Rodr=C3=ADguez=20Caballero?= Date: Sun, 21 Mar 2021 20:38:34 +0100 Subject: [PATCH 01/40] fix(StoryViewerFragment): wrong viewModel superclass assigned on init --- .../fragments/StoryViewerFragment.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java index 4b2108a8..bfdeaaf3 100644 --- a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java @@ -304,11 +304,18 @@ public class StoryViewerFragment extends Fragment { // isNotification = fragmentArgs.getIsNotification(); final Type type = options.getType(); if (currentFeedStoryIndex >= 0) { - viewModel = type == Type.HIGHLIGHT - ? type == Type.STORY_ARCHIVE - ? new ViewModelProvider(fragmentActivity).get(ArchivesViewModel.class) - : new ViewModelProvider(fragmentActivity).get(HighlightsViewModel.class) - : new ViewModelProvider(fragmentActivity).get(FeedStoriesViewModel.class); + switch (type) { + case HIGHLIGHT: + viewModel = new ViewModelProvider(fragmentActivity).get(HighlightsViewModel.class); + break; + case STORY_ARCHIVE: + viewModel = new ViewModelProvider(fragmentActivity).get(ArchivesViewModel.class); + break; + default: + case FEED_STORY_POSITION: + viewModel = new ViewModelProvider(fragmentActivity).get(FeedStoriesViewModel.class); + break; + } } setupStories(); } From 0afe482b864b0b2b49c4a3ec48bed814a17d3963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Rodr=C3=ADguez=20Caballero?= Date: Sun, 21 Mar 2021 21:30:20 +0100 Subject: [PATCH 02/40] fix(StoryViewerFragment): crash when parsing unexpected Instagram id --- .../fragments/StoryViewerFragment.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java index bfdeaaf3..c10e4384 100644 --- a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java @@ -65,6 +65,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import awais.instagrabber.BuildConfig; import awais.instagrabber.R; @@ -735,7 +737,7 @@ public class StoryViewerFragment extends Fragment { return; } final HighlightModel model = models.get(currentFeedStoryIndex); - currentStoryMediaId = model.getId(); + currentStoryMediaId = parseStoryMediaId(model.getId()); currentStoryUsername = model.getTitle(); fetchOptions = StoryViewerOptions.forUser(Long.parseLong(currentStoryMediaId), currentStoryUsername); break; @@ -1146,4 +1148,20 @@ public class StoryViewerFragment extends Fragment { resetView(); } } + + /** + * Parses the Story's media ID. For user stories this is a number, but for archive stories + * this is "archiveDay:" plus a number. + */ + private static String parseStoryMediaId(String rawId) { + final String regex = "(?:archiveDay:)?(.+)"; + final Pattern pattern = Pattern.compile(regex); + final Matcher matcher = pattern.matcher(rawId); + + if (matcher.matches() && matcher.groupCount() >= 1) { + return matcher.group(1); + } + + return rawId; + } } From 442903eaf9363738977eda47bf1298f29a7fc2d9 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sun, 21 Mar 2021 19:11:33 -0400 Subject: [PATCH 03/40] make archives usable and also some marginal improvements --- .../fragments/StoryListViewerFragment.java | 2 +- .../fragments/StoryViewerFragment.java | 2 +- .../requests/StoryViewerOptions.java | 4 +-- .../instagrabber/utils/ResponseBodyUtils.java | 7 ++---- .../webservices/StoriesService.java | 25 ++++++++----------- 5 files changed, 16 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java b/app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java index 57a9d7be..ee997c86 100644 --- a/app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java @@ -79,7 +79,7 @@ public final class StoryListViewerFragment extends Fragment implements SwipeRefr public void onHighlightClick(final HighlightModel model, final int position) { if (model == null) return; final NavDirections action = StoryListViewerFragmentDirections - .actionStoryListFragmentToStoryViewerFragment(StoryViewerOptions.forStoryArchive(position)); + .actionStoryListFragmentToStoryViewerFragment(StoryViewerOptions.forStoryArchive(model.getId())); NavHostFragment.findNavController(StoryListViewerFragment.this).navigate(action); } diff --git a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java index c10e4384..82438999 100644 --- a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java @@ -739,7 +739,7 @@ public class StoryViewerFragment extends Fragment { final HighlightModel model = models.get(currentFeedStoryIndex); currentStoryMediaId = parseStoryMediaId(model.getId()); currentStoryUsername = model.getTitle(); - fetchOptions = StoryViewerOptions.forUser(Long.parseLong(currentStoryMediaId), currentStoryUsername); + fetchOptions = StoryViewerOptions.forStoryArchive(model.getId()); break; } } diff --git a/app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java b/app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java index 2981d4ec..d8308c8a 100644 --- a/app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java +++ b/app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java @@ -57,8 +57,8 @@ public class StoryViewerOptions implements Serializable { return new StoryViewerOptions(position, Type.FEED_STORY_POSITION); } - public static StoryViewerOptions forStoryArchive(final int position) { - return new StoryViewerOptions(position, Type.STORY_ARCHIVE); + public static StoryViewerOptions forStoryArchive(final String id) { + return new StoryViewerOptions(id, Type.STORY_ARCHIVE); } public long getId() { diff --git a/app/src/main/java/awais/instagrabber/utils/ResponseBodyUtils.java b/app/src/main/java/awais/instagrabber/utils/ResponseBodyUtils.java index 7a5b8361..6c2f604a 100644 --- a/app/src/main/java/awais/instagrabber/utils/ResponseBodyUtils.java +++ b/app/src/main/java/awais/instagrabber/utils/ResponseBodyUtils.java @@ -962,8 +962,7 @@ public final class ResponseBodyUtils { // } public static StoryModel parseStoryItem(final JSONObject data, - final boolean isLoc, - final boolean isHashtag, + final boolean isLocOrHashtag, final String username) throws JSONException { final boolean isVideo = data.has("video_duration"); final StoryModel model = new StoryModel(data.getString("id"), @@ -971,9 +970,7 @@ public final class ResponseBodyUtils { .getString("url"), null, isVideo ? MediaItemType.MEDIA_TYPE_VIDEO : MediaItemType.MEDIA_TYPE_IMAGE, data.optLong("taken_at", 0), - (isLoc || isHashtag) - ? data.getJSONObject("user").getString("username") - : username, + isLocOrHashtag ? data.getJSONObject("user").getString("username") : username, data.getJSONObject("user").getLong("pk"), data.optBoolean("can_reply")); diff --git a/app/src/main/java/awais/instagrabber/webservices/StoriesService.java b/app/src/main/java/awais/instagrabber/webservices/StoriesService.java index fd05af17..9b47839b 100644 --- a/app/src/main/java/awais/instagrabber/webservices/StoriesService.java +++ b/app/src/main/java/awais/instagrabber/webservices/StoriesService.java @@ -95,7 +95,7 @@ public class StoriesService extends BaseService { } try { final JSONObject itemJson = new JSONObject(body).getJSONArray("items").getJSONObject(0); - callback.onSuccess(ResponseBodyUtils.parseStoryItem(itemJson, false, false, null)); + callback.onSuccess(ResponseBodyUtils.parseStoryItem(itemJson, false, null)); } catch (JSONException e) { callback.onFailure(e); } @@ -187,7 +187,7 @@ public class StoriesService extends BaseService { final boolean isBestie = node.optBoolean("has_besties_media", false); StoryModel firstStoryModel = null; if (itemJson != null) { - firstStoryModel = ResponseBodyUtils.parseStoryItem(itemJson, false, false, null); + firstStoryModel = ResponseBodyUtils.parseStoryItem(itemJson, false, null); } feedStoryModels.add(new FeedStoryModel(id, user, fullyRead, timestamp, firstStoryModel, mediaCount, false, isBestie)); } @@ -364,9 +364,8 @@ public class StoriesService extends BaseService { final ServiceCallback> callback) { final String url = buildUrl(options); final Call userStoryCall = repository.getUserStory(url); - final boolean isLoc = options.getType() == StoryViewerOptions.Type.LOCATION; - final boolean isHashtag = options.getType() == StoryViewerOptions.Type.HASHTAG; - final boolean isHighlight = options.getType() == StoryViewerOptions.Type.HIGHLIGHT; + final boolean isLocOrHashtag = options.getType() == StoryViewerOptions.Type.LOCATION || options.getType() == StoryViewerOptions.Type.HASHTAG; + final boolean isHighlight = options.getType() == StoryViewerOptions.Type.HIGHLIGHT || options.getType() == StoryViewerOptions.Type.STORY_ARCHIVE; userStoryCall.enqueue(new Callback() { @Override public void onResponse(@NonNull final Call call, @NonNull final Response response) { @@ -380,7 +379,7 @@ public class StoriesService extends BaseService { data = new JSONObject(body); if (!isHighlight) { - data = data.optJSONObject((isLoc || isHashtag) ? "story" : "reel"); + data = data.optJSONObject((isLocOrHashtag) ? "story" : "reel"); } else { data = data.getJSONObject("reels").optJSONObject(options.getName()); } @@ -388,8 +387,7 @@ public class StoriesService extends BaseService { String username = null; if (data != null // && localUsername == null - && !isLoc - && !isHashtag) { + && !isLocOrHashtag) { username = data.getJSONObject("user").getString("username"); } @@ -397,12 +395,11 @@ public class StoriesService extends BaseService { if (data != null && (media = data.optJSONArray("items")) != null && media.length() > 0 && media.optJSONObject(0) != null) { - final int mediaLen = media.length(); final List models = new ArrayList<>(); for (int i = 0; i < mediaLen; ++i) { data = media.getJSONObject(i); - models.add(ResponseBodyUtils.parseStoryItem(data, isLoc, isHashtag, username)); + models.add(ResponseBodyUtils.parseStoryItem(data, isLocOrHashtag, username)); } callback.onSuccess(models); } else { @@ -543,6 +540,7 @@ public class StoriesService extends BaseService { id = String.valueOf(options.getId()); break; case HIGHLIGHT: + case STORY_ARCHIVE: builder.append("feed/reels_media/?user_ids="); id = options.getName(); break; @@ -550,15 +548,12 @@ public class StoriesService extends BaseService { break; // case FEED_STORY_POSITION: // break; - // case STORY_ARCHIVE: - // break; } if (id == null) { return null; } - final String userId = id.replace(":", "%3A"); - builder.append(userId); - if (type != StoryViewerOptions.Type.HIGHLIGHT) { + builder.append(id); + if (type != StoryViewerOptions.Type.HIGHLIGHT && type != StoryViewerOptions.Type.STORY_ARCHIVE) { builder.append("/story/"); } return builder.toString(); From d93f89cf39b879a409728b7390aea6ef99b0450c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 24 Mar 2021 17:48:08 +0000 Subject: [PATCH 04/40] Update dependency androidx.camera:camera-camera2 to v1.1.0-alpha03 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 493366c3..fe1764ac 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -105,7 +105,7 @@ dependencies { annotationProcessor "androidx.room:room-compiler:$room_version" // CameraX - def camerax_version = "1.1.0-alpha02" + def camerax_version = "1.1.0-alpha03" implementation "androidx.camera:camera-camera2:$camerax_version" implementation "androidx.camera:camera-lifecycle:$camerax_version" implementation "androidx.camera:camera-view:1.0.0-alpha22" From 0834decb1bec0c306e93ef54a360b53bd973bfae Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 24 Mar 2021 17:48:13 +0000 Subject: [PATCH 05/40] Update dependency androidx.camera:camera-lifecycle to v1.1.0-alpha03 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 493366c3..fe1764ac 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -105,7 +105,7 @@ dependencies { annotationProcessor "androidx.room:room-compiler:$room_version" // CameraX - def camerax_version = "1.1.0-alpha02" + def camerax_version = "1.1.0-alpha03" implementation "androidx.camera:camera-camera2:$camerax_version" implementation "androidx.camera:camera-lifecycle:$camerax_version" implementation "androidx.camera:camera-view:1.0.0-alpha22" From ac5425803a3cc4bfc4d65acf54183588ea70e689 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 24 Mar 2021 19:54:54 +0000 Subject: [PATCH 06/40] Update dependency androidx.recyclerview:recyclerview to v1.2.0-rc01 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index fe1764ac..1f92ed58 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -85,7 +85,7 @@ dependencies { implementation "androidx.appcompat:appcompat:$appcompat_version" implementation "androidx.appcompat:appcompat-resources:$appcompat_version" - implementation "androidx.recyclerview:recyclerview:1.2.0-beta02" + implementation "androidx.recyclerview:recyclerview:1.2.0-rc01" implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation "androidx.viewpager2:viewpager2:1.0.0" implementation "androidx.navigation:navigation-fragment:$nav_version" From 6bed9bf28ca6e15b35f3142e66f9fff9ff09867f Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Thu, 25 Mar 2021 19:47:33 +0900 Subject: [PATCH 07/40] Fix double voice message --- .../awais/instagrabber/viewmodels/DirectThreadViewModel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/awais/instagrabber/viewmodels/DirectThreadViewModel.java b/app/src/main/java/awais/instagrabber/viewmodels/DirectThreadViewModel.java index 3e2a3603..1ca3c263 100644 --- a/app/src/main/java/awais/instagrabber/viewmodels/DirectThreadViewModel.java +++ b/app/src/main/java/awais/instagrabber/viewmodels/DirectThreadViewModel.java @@ -181,6 +181,7 @@ public class DirectThreadViewModel extends AndroidViewModel { MediaUtils.getVoiceInfo(contentResolver, uri, new MediaUtils.OnInfoLoadListener() { @Override public void onLoad(@Nullable final MediaUtils.VideoInfo videoInfo) { + if (videoInfo == null) return; threadManager.sendVoice(data, uri, result.getWaveform(), From 926ebca9e949d68b1e29d22107c307982b1b3065 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Thu, 25 Mar 2021 21:07:16 +0900 Subject: [PATCH 08/40] Set dm colors for Light themes. Also some dm fixes. --- .../DirectItemProfileViewHolder.java | 9 +++++++-- .../masoudss_waveform/WaveformSeekBar.java | 18 ++++++++++++++++-- .../DirectMessageSettingsFragment.java | 7 +++---- .../DirectMessageThreadFragment.java | 5 ++++- .../layout/fragment_direct_messages_thread.xml | 2 +- app/src/main/res/layout/layout_dm_base.xml | 1 + app/src/main/res/layout/layout_dm_link.xml | 4 ++++ .../main/res/layout/layout_dm_media_share.xml | 2 ++ app/src/main/res/layout/layout_dm_profile.xml | 6 ++++-- .../main/res/layout/layout_dm_reel_share.xml | 1 + .../main/res/layout/layout_dm_story_share.xml | 1 + app/src/main/res/layout/layout_dm_text.xml | 1 + .../main/res/layout/layout_dm_voice_media.xml | 4 +++- app/src/main/res/values/attrs.xml | 8 ++++++++ app/src/main/res/values/themes.xml | 12 ++++++++++++ 15 files changed, 68 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemProfileViewHolder.java b/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemProfileViewHolder.java index 4b55c59f..0360b6b7 100644 --- a/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemProfileViewHolder.java +++ b/app/src/main/java/awais/instagrabber/adapters/viewholder/directmessages/DirectItemProfileViewHolder.java @@ -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())); } diff --git a/app/src/main/java/awais/instagrabber/customviews/masoudss_waveform/WaveformSeekBar.java b/app/src/main/java/awais/instagrabber/customviews/masoudss_waveform/WaveformSeekBar.java index 9e1cfdb8..a2054df1 100755 --- a/app/src/main/java/awais/instagrabber/customviews/masoudss_waveform/WaveformSeekBar.java +++ b/app/src/main/java/awais/instagrabber/customviews/masoudss_waveform/WaveformSeekBar.java @@ -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() { diff --git a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageSettingsFragment.java b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageSettingsFragment.java index 64c7fbca..a960cd36 100644 --- a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageSettingsFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageSettingsFragment.java @@ -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) -> { diff --git a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java index 2962c078..acb1dcde 100644 --- a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java @@ -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); } diff --git a/app/src/main/res/layout/fragment_direct_messages_thread.xml b/app/src/main/res/layout/fragment_direct_messages_thread.xml index 007005a1..96b0bc34 100644 --- a/app/src/main/res/layout/fragment_direct_messages_thread.xml +++ b/app/src/main/res/layout/fragment_direct_messages_thread.xml @@ -156,7 +156,7 @@ android:hint="@string/message" android:paddingTop="12dp" android:paddingBottom="12dp" - android:textColor="@color/white" + android:textColor="?dmInputTextColor" android:textColorHint="@color/grey_500" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" diff --git a/app/src/main/res/layout/layout_dm_base.xml b/app/src/main/res/layout/layout_dm_base.xml index 0c389368..fd6c61da 100644 --- a/app/src/main/res/layout/layout_dm_base.xml +++ b/app/src/main/res/layout/layout_dm_base.xml @@ -113,6 +113,7 @@ android:paddingEnd="@dimen/dm_message_card_radius" android:paddingBottom="4dp" android:singleLine="true" + android:textColor="@color/white" app:layout_constraintBottom_toTopOf="@id/chat_message_layout" app:layout_constraintEnd_toEndOf="@id/chat_message_layout" app:layout_constraintHorizontal_bias="0" diff --git a/app/src/main/res/layout/layout_dm_link.xml b/app/src/main/res/layout/layout_dm_link.xml index b5ad42a7..a9b05472 100644 --- a/app/src/main/res/layout/layout_dm_link.xml +++ b/app/src/main/res/layout/layout_dm_link.xml @@ -15,6 +15,7 @@ android:paddingEnd="@dimen/dm_message_card_radius" android:paddingBottom="@dimen/dm_message_card_radius_small" android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" + android:textColor="@color/white" tools:text="Some message" /> \ No newline at end of file diff --git a/app/src/main/res/layout/layout_dm_media_share.xml b/app/src/main/res/layout/layout_dm_media_share.xml index fcc74942..dfe9e45c 100644 --- a/app/src/main/res/layout/layout_dm_media_share.xml +++ b/app/src/main/res/layout/layout_dm_media_share.xml @@ -86,6 +86,7 @@ android:paddingEnd="8dp" android:paddingBottom="0dp" android:textAppearance="@style/TextAppearance.MaterialComponents.Body2" + android:textColor="@color/white" android:textStyle="bold" app:layout_constraintBottom_toTopOf="@id/caption" app:layout_constraintEnd_toEndOf="parent" @@ -101,6 +102,7 @@ android:layout_height="wrap_content" android:padding="8dp" android:textAppearance="@style/TextAppearance.MaterialComponents.Body2" + android:textColor="@color/white" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/layout_dm_profile.xml b/app/src/main/res/layout/layout_dm_profile.xml index a8e179b5..fc1e11f5 100644 --- a/app/src/main/res/layout/layout_dm_profile.xml +++ b/app/src/main/res/layout/layout_dm_profile.xml @@ -27,7 +27,7 @@ android:ellipsize="end" android:gravity="bottom" android:singleLine="true" - android:textColor="?android:textColorPrimary" + android:textColor="@color/white" android:textSize="16sp" android:textStyle="bold" app:layout_constrainedWidth="true" @@ -62,12 +62,14 @@ android:ellipsize="end" android:singleLine="true" android:textAppearance="@style/TextAppearance.MaterialComponents.Body2" + android:textColor="@color/white" android:visibility="gone" app:layout_constraintBottom_toTopOf="@id/barrier" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="@id/username" app:layout_constraintTop_toBottomOf="@id/username" - tools:text="Full name" /> + tools:text="Full name" + tools:visibility="visible" /> \ No newline at end of file diff --git a/app/src/main/res/layout/layout_dm_text.xml b/app/src/main/res/layout/layout_dm_text.xml index 7ec388f9..1e1bdca9 100644 --- a/app/src/main/res/layout/layout_dm_text.xml +++ b/app/src/main/res/layout/layout_dm_text.xml @@ -9,4 +9,5 @@ android:paddingEnd="@dimen/dm_message_card_radius" android:paddingBottom="@dimen/dm_message_card_radius_small" android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" + android:textColor="@color/white" tools:text="Text message" /> \ No newline at end of file diff --git a/app/src/main/res/layout/layout_dm_voice_media.xml b/app/src/main/res/layout/layout_dm_voice_media.xml index d2c49818..8c8b5968 100644 --- a/app/src/main/res/layout/layout_dm_voice_media.xml +++ b/app/src/main/res/layout/layout_dm_voice_media.xml @@ -66,10 +66,12 @@ android:layout_height="54dp" android:layout_marginStart="8dp" android:layout_marginEnd="4dp" + app:waveformBackgroundColor="?dmWaveformBgColor" app:layout_constraintBottom_toTopOf="@id/duration" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/play_wrapper" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:waveformProgressColor="?dmWaveformProgressColor" /> + + + @@ -26,4 +29,9 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index b0147225..cd0d78a9 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -20,6 +20,9 @@ @style/ThemeOverlay.MaterialComponents.ActionBar @style/ThemeOverlay.MaterialComponents.MaterialAlertDialog.Light + @color/grey_600 + @color/deep_purple_400 + @color/deep_purple_600