Skip to content

Commit

Permalink
dependencies updated, caused breakage fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jun 27, 2022
1 parent 9a2320c commit 2fb8957
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
5 changes: 2 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ dependencies {
implementation "androidx.camera:camera-lifecycle:${camerax_version}"

// Don't change to 1.4.0 (requires API 31).
// noinspection GradleDependency
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
Expand All @@ -97,7 +96,7 @@ dependencies {
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.firebase:firebase-core:21.0.0'
implementation 'com.google.firebase:firebase-crashlytics:18.2.11'
implementation 'com.google.firebase:firebase-messaging:23.0.5'
implementation 'com.google.firebase:firebase-messaging:23.0.6'


// Don't change to 2.7182... The 2.8 is the latest.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,12 @@ public void onMessageReceived(RemoteMessage remoteMessage) {
Drafty draftyBody = Tinode.jsonDeserialize(richContent, Drafty.class.getCanonicalName());
if (draftyBody != null) {
@SuppressLint("ResourceType") @StyleableRes int[] attrs = {android.R.attr.textSize};
TypedArray ta = obtainStyledAttributes(androidx.appcompat.R.style.TextAppearance_Compat_Notification, attrs);
float fontSize = ta.getDimension(0, 14f);
ta.recycle();
float fontSize = 14f;
try {
TypedArray ta = obtainStyledAttributes(R.style.TextAppearance_Compat_Notification, attrs);
fontSize = ta.getDimension(0, 14f);
ta.recycle();
} catch (Resources.NotFoundException ignored) {}
body = draftyBody.shorten(MAX_MESSAGE_LENGTH, true)
.format(new FontFormatter(this, fontSize));
} else {
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/layout/contact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
android:layout_height="48dp"
android:layout_marginEnd="8dp">

<!--
app:strokeColor="@android:color/transparent" is needed because
ShapeableImageView is buggy.
-->
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/avatar"
android:layout_width="48dp"
android:layout_height="48dp"
app:strokeColor="@android:color/transparent"
app:shapeAppearanceOverlay="@style/roundImageView"
app:srcCompat="@drawable/ic_person_circle" />

Expand All @@ -40,7 +45,8 @@
android:contentDescription="@string/content_deleted"
android:background="@color/design_default_color_background"
app:shapeAppearanceOverlay="@style/roundImageView"
app:srcCompat="@drawable/ic_cancel_grey" />
app:srcCompat="@drawable/ic_cancel_grey"
app:strokeColor="@android:color/transparent" />

</RelativeLayout>

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ buildscript {
classpath 'com.android.tools.build:gradle:7.2.1'

// For FCM push notifications
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.gms:google-services:4.3.12'

// Crashlytics
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'

// Legal compliance: plugin to collect and display OSS licenses.
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.5'
Expand Down

0 comments on commit 2fb8957

Please sign in to comment.