Skip to content

Commit 770d046

Browse files
committed
Merge branch 'release-2.5.5'
* release-2.5.5: Bump version for release 2.5.5 Update translations. build: update Gradle plugin to 3.1.2 build: update Kotlin version to 1.2.40 Support adaptive icons StockDisplayUtils: solve some compilation warnings MedicineItem: fix missing string for stock info under some cases Update build tools versions build: Update Gradle plugin and dist PickupNotification: unwrap useless version checks
2 parents 0a43f30 + 366e78b commit 770d046

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+533
-151
lines changed

Calendula/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ task copyTestClasses(type: Copy) {
7272
}
7373

7474
android {
75-
compileSdkVersion 25
76-
buildToolsVersion '26.0.2'
75+
compileSdkVersion 26
76+
buildToolsVersion '27.0.3'
7777
defaultConfig {
7878
minSdkVersion 16
7979
targetSdkVersion 25
80-
versionCode 35
81-
versionName "2.5.4"
80+
versionCode 36
81+
versionName "2.5.5"
8282
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
8383
applicationId "es.usc.citius.servando.calendula"
8484
multiDexEnabled true
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Calendula/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<application
3838
android:name=".CalendulaApp"
3939
android:allowBackup="true"
40-
android:icon="@drawable/ic_launcher"
40+
android:icon="@mipmap/ic_launcher"
4141
android:label="@string/app_name"
4242
android:theme="@style/AppTheme">
4343

-5.93 KB
Loading

Calendula/src/main/java/es/usc/citius/servando/calendula/activities/PickupNotification.java

+2-10
Original file line numberDiff line numberDiff line change
@@ -113,21 +113,13 @@ public static void notify(final Context context, final String title, final Strin
113113
public static void cancel(final Context context) {
114114
final NotificationManager nm = (NotificationManager) context
115115
.getSystemService(Context.NOTIFICATION_SERVICE);
116-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) {
117-
nm.cancel(NOTIFICATION_TAG, 0);
118-
} else {
119-
nm.cancel(NOTIFICATION_TAG.hashCode());
120-
}
116+
nm.cancel(NOTIFICATION_TAG, 0);
121117
}
122118

123119
@TargetApi(Build.VERSION_CODES.ECLAIR)
124120
private static void notify(final Context context, final Notification notification) {
125121
final NotificationManager nm = (NotificationManager) context
126122
.getSystemService(Context.NOTIFICATION_SERVICE);
127-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) {
128-
nm.notify(NOTIFICATION_TAG, 0, notification);
129-
} else {
130-
nm.notify(NOTIFICATION_TAG.hashCode(), notification);
131-
}
123+
nm.notify(NOTIFICATION_TAG, 0, notification);
132124
}
133125
}

Calendula/src/main/java/es/usc/citius/servando/calendula/adapters/items/MedicineItem.java

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ public void bindView(MedicineViewHolder holder, List<Object> payloads) {
9090

9191
if (medicine.getStock() != null && medicine.getStock() >= 0) {
9292
holder.stockInfo.setText(ctx.getString(R.string.stock_remaining_msg, medicine.getStock().intValue(), medicine.getPresentation().units(ctx.getResources(), medicine.getStock())));
93+
} else {
94+
holder.stockInfo.setText(R.string.no_stock_info_msg);
9395
}
9496
}
9597

Calendula/src/main/java/es/usc/citius/servando/calendula/util/stock/StockDisplayUtils.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ object StockDisplayUtils {
7777
.withDialogAnimation(true)
7878
.setDescription(msg)
7979
.setPositiveText(R.string.manage_stock)
80-
.onPositive { dialog, which ->
80+
.onPositive { _, _ ->
8181
val i = Intent(context, MedicinesActivity::class.java)
8282
i.putExtra(CalendulaApp.INTENT_EXTRA_MEDICINE_ID, m.id)
8383
context.startActivity(i)
8484
}
8585
.setNeutralText(R.string.tutorial_understood)
86-
.onNeutral { dialog, which -> dialog.dismiss() }
86+
.onNeutral { dialog, _ -> dialog.dismiss() }
8787
.show()
8888

8989
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Calendula/src/main/res/values-de/strings_translatable.xml

+16
Original file line numberDiff line numberDiff line change
@@ -503,4 +503,20 @@ Wollen Sie nun die neue Datenbank installieren?
503503
<string name="patient_add">"Neuer Patient"</string>
504504
<string name="db_download_and_setup">"Herunterladen und installieren"</string>
505505
<string name="schedule_continue_indefinitely">"Soll dieser Einnahmeplan dauerhaft fortgeführt werden?"</string>
506+
<string name="powder">"Puder"</string>
507+
<string name="cream">"Creme"</string>
508+
<plurals name="powder_units">
509+
<item quantity="one">"Gramm"</item>
510+
<item quantity="other">"Gramm"</item>
511+
</plurals>
512+
<plurals name="cream_units">
513+
<item quantity="one">"Anwendung"</item>
514+
<item quantity="other">"Anwendungen"</item>
515+
</plurals>
516+
<plurals name="generic_units">
517+
<item quantity="one">"Einheit"</item>
518+
<item quantity="other">"Einheiten"</item>
519+
</plurals>
520+
<string name="generic_presentation">"Generisch"</string>
521+
<string name="notification_taken">"Eingenommen"</string>
506522
</resources>

0 commit comments

Comments
 (0)