diff --git a/app/build.gradle b/app/build.gradle index a1eea6d50..4d41ddb53 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -108,7 +108,7 @@ ext.retrofitVersion = '2.9.0' ext.okhttpVersion = '4.7.2' ext.glideVersion = '4.11.0' ext.daggerVersion = '2.27' -ext.materialdrawerVersion = '8.0.3' +ext.materialdrawerVersion = '8.1.2' repositories { maven { @@ -122,7 +122,7 @@ dependencies { implementation "androidx.core:core-ktx:1.3.0" implementation "androidx.appcompat:appcompat:1.2.0-rc01" - implementation "androidx.fragment:fragment-ktx:1.2.4" + implementation "androidx.fragment:fragment-ktx:1.2.5" implementation "androidx.browser:browser:1.2.0" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" implementation "androidx.recyclerview:recyclerview:1.1.0" @@ -184,7 +184,7 @@ dependencies { testImplementation "androidx.test.ext:junit:1.1.1" testImplementation "org.robolectric:robolectric:4.3.1" - testImplementation "org.mockito:mockito-inline:3.2.4" + testImplementation "org.mockito:mockito-inline:3.3.3" testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0" androidTestImplementation "androidx.test.espresso:espresso-core:3.2.0" diff --git a/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt b/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt index 6173d88e2..643e988ca 100644 --- a/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt @@ -660,8 +660,8 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje val pageMargin = resources.getDimensionPixelSize(R.dimen.tab_page_margin) viewPager.setPageTransformer(MarginPageTransformer(pageMargin)) - val uswSwipeForTabs = preferences.getBoolean("enableSwipeForTabs", true) - viewPager.isUserInputEnabled = uswSwipeForTabs + val enableSwipeForTabs = preferences.getBoolean("enableSwipeForTabs", true) + viewPager.isUserInputEnabled = enableSwipeForTabs onTabSelectedListener?.let { activeTabLayout.removeOnTabSelectedListener(it) @@ -685,7 +685,8 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje activeTabLayout.addOnTabSelectedListener(it) } - mainToolbar.title = tabs[0].title(this@MainActivity) + val activeTabPosition = if (selectNotificationTab) notificationTabPosition else 0 + mainToolbar.title = tabs[activeTabPosition].title(this@MainActivity) keepScreenOn() return popups diff --git a/app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt b/app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt index a111f7cc5..615c01a13 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt @@ -248,26 +248,22 @@ class ComposeActivity : BaseActivity(), for (uri in uriList) { pickMedia(uri) } - } else if (type == "text/plain") { - val action = intent.action - if (action != null && action == Intent.ACTION_SEND) { - val subject = intent.getStringExtra(Intent.EXTRA_SUBJECT) - val text = intent.getStringExtra(Intent.EXTRA_TEXT) - val shareBody = if (subject != null && text != null) { - if (subject != text && !text.contains(subject)) { - String.format("%s\n%s", subject, text) - } else { - text - } - } else text ?: subject + } else if (type == "text/plain" && intent.action == Intent.ACTION_SEND) { - if (shareBody != null) { - val start = composeEditField.selectionStart.coerceAtLeast(0) - val end = composeEditField.selectionEnd.coerceAtLeast(0) - val left = min(start, end) - val right = max(start, end) - composeEditField.text.replace(left, right, shareBody, 0, shareBody.length) - } + val subject = intent.getStringExtra(Intent.EXTRA_SUBJECT) + val text = intent.getStringExtra(Intent.EXTRA_TEXT).orEmpty() + val shareBody = if (!subject.isNullOrBlank() && subject !in text) { + subject + '\n' + text + } else { + text + } + + if (shareBody.isNotBlank()) { + val start = composeEditField.selectionStart.coerceAtLeast(0) + val end = composeEditField.selectionEnd.coerceAtLeast(0) + val left = min(start, end) + val right = max(start, end) + composeEditField.text.replace(left, right, shareBody, 0, shareBody.length) } } } diff --git a/app/src/main/java/com/keylesspalace/tusky/util/BlurHashDecoder.kt b/app/src/main/java/com/keylesspalace/tusky/util/BlurHashDecoder.kt index 3429dc246..bd5f9007c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/BlurHashDecoder.kt +++ b/app/src/main/java/com/keylesspalace/tusky/util/BlurHashDecoder.kt @@ -87,7 +87,7 @@ object BlurHashDecoder { numCompX: Int, numCompY: Int, colors: Array ): Bitmap { - val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) + val imageArray = IntArray(width * height) for (y in 0 until height) { for (x in 0 until width) { var r = 0f @@ -102,10 +102,10 @@ object BlurHashDecoder { b += color[2] * basis } } - bitmap.setPixel(x, y, Color.rgb(linearToSrgb(r), linearToSrgb(g), linearToSrgb(b))) + imageArray[x + width * y] = Color.rgb(linearToSrgb(r), linearToSrgb(g), linearToSrgb(b)) } } - return bitmap + return Bitmap.createBitmap(imageArray, width, height, Bitmap.Config.ARGB_8888) } private fun linearToSrgb(value: Float): Int { diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index bcdf01f3b..1509bfd51 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -493,4 +493,5 @@ %s طلبَ متابعتك الوسوم إضافة وسم + اظهر ألوانا متدرّجة للوسائط المخفية \ No newline at end of file diff --git a/app/src/main/res/values-no-rNB/strings.xml b/app/src/main/res/values-no-rNB/strings.xml index 276f8e05d..8179dcae8 100644 --- a/app/src/main/res/values-no-rNB/strings.xml +++ b/app/src/main/res/values-no-rNB/strings.xml @@ -455,4 +455,7 @@ Legg til stikkord %s ønsker å følge deg Vis fargerike gradienter for skjult media + Bunn + Topp + Plassering av hovednavigasjon \ No newline at end of file diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 3b8061bc1..3af893e1f 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -33,24 +33,24 @@ Usuários silenciados Usuários bloqueados Seguidores pendentes - Editar seu perfil + Editar perfil Rascunhos Licenças %s deu boost Mídia sensível - Mídia oculta + Mídia sensível Toque para ver Mostrar mais Mostrar menos Nada aqui. Arraste para atualizar! - %s compartilhou o seu toot + %s deu boost no seu toot %s favoritou seu toot %s te seguiu Denunciar @%s Comentários adicionais? Resposta rápida Responder - Boost + Dar boost Desfazer boost Favoritar Desfavoritar @@ -83,7 +83,7 @@ Tirar foto Compartilhar Silenciar - Desativar silêncio + Desfazer silêncio Mencionar Ocultar mídia Abrir gaveta @@ -109,8 +109,8 @@ Copiar link Abrir como %s Compartilhar como … - Compartilhar link do toot no… - Compartilhar toot no… + Compartilhar link do toot em… + Compartilhar toot em… Compartilhar mídia via… Enviado! Usuário desbloqueado @@ -464,4 +464,8 @@ Solicitar confirmação antes de dar boost Hashtags Adicionar hashtag + Mostrar blur em mídia sensível + Inferior + Superior + Posição do menu diff --git a/fastlane/metadata/android/fr/changelogs/72.txt b/fastlane/metadata/android/fr/changelogs/72.txt new file mode 100644 index 000000000..ad75c990a --- /dev/null +++ b/fastlane/metadata/android/fr/changelogs/72.txt @@ -0,0 +1,9 @@ +Tusky v11.0 + +- Notifications à propos des nouvelles demandes d’abonnement lorsque votre compte est verrouillé +- Nouvelles fonctionalités activables via l’écran Préférences : +- désactiver le pivotement entre onglets +- afficher une boîte de dialogue de confirmation avant de booster un pouet +- afficher les aperçus des liens dans les fils +- Possibilité de mettre en sourdine les conversations +- Les résultats des sondages seront désormais calculés en fonction du nombre des sond·é·s diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 490fda857..62d4c0535 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradlew b/gradlew index 2fe81a7d9..fbd7c5158 100755 --- a/gradlew +++ b/gradlew @@ -82,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -129,6 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/gradlew.bat b/gradlew.bat index 9109989e3..a9f778a7a 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%* set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%