Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Commit 67bcc93

Browse files
simophinfanchao
authored andcommitted
Strings work
Squashed commit of the following: commit 86cab0e Author: ThomasSession <[email protected]> Date: Fri Aug 30 10:17:04 2024 +1000 Bringing my xml dialog styling from my 'Standardise message deletion' branch commit 706d1aa Author: ThomasSession <[email protected]> Date: Fri Aug 30 09:49:48 2024 +1000 fixing up clear data dialog Removing unused code commit f905994 Author: Al Lansley <[email protected]> Date: Fri Aug 30 09:13:51 2024 +1000 Replaced 'now' with 12/24 hour time commit 16b8ad4 Author: alansley <[email protected]> Date: Thu Aug 29 17:34:03 2024 +1000 Fix two one-liner issues commit 4c6c450 Merge: 052f910 beb89d5 Author: ThomasSession <[email protected]> Date: Thu Aug 29 17:07:16 2024 +1000 Merge branch 'strings-squashed' of https://github.com/oxen-io/session-android into strings-squashed commit 052f910 Author: ThomasSession <[email protected]> Date: Thu Aug 29 17:06:53 2024 +1000 More bold fixing commit beb89d5 Author: fanchao <[email protected]> Date: Thu Aug 29 17:00:37 2024 +1000 Fix incorrect group member left message commit 5773f05 Merge: d35482d 1cec477 Author: ThomasSession <[email protected]> Date: Thu Aug 29 15:21:44 2024 +1000 Merge branch 'strings-squashed' of https://github.com/oxen-io/session-android into strings-squashed commit d35482d Author: ThomasSession <[email protected]> Date: Thu Aug 29 15:20:13 2024 +1000 More bold fixes and UI tweaks commit 78a9ab7 Author: ThomasSession <[email protected]> Date: Thu Aug 29 14:03:41 2024 +1000 Making sure we bold appropriately commit 1cec477 Author: alansley <[email protected]> Date: Thu Aug 29 13:33:50 2024 +1000 Made call to 'getQuantityString' pass the count twice because otherwise it doesn't work correctly commit 8e80ab0 Author: ThomasSession <[email protected]> Date: Thu Aug 29 13:28:54 2024 +1000 Using the existing implementation commit cb9554a Author: alansley <[email protected]> Date: Thu Aug 29 12:32:30 2024 +1000 Merge CrowdIn strings circa 2024-08-29 commit dd57da7 Author: alansley <[email protected]> Date: Thu Aug 29 09:06:22 2024 +1000 Updated Phrase usage in ConversationAdapter commit 34b15d7 Author: alansley <[email protected]> Date: Thu Aug 29 09:03:55 2024 +1000 Converted TransferControlView into Kotlin and updated Phrase usage commit a35a7a6 Author: alansley <[email protected]> Date: Thu Aug 29 08:55:16 2024 +1000 Converted MessageReceipientNotificationBuilder to Kotlin & updated Phrase usage commit 6dd93b3 Author: alansley <[email protected]> Date: Thu Aug 29 08:25:24 2024 +1000 Update MuteDialog, LinkPreviewDialog, and PathActivity commit e7dd1c5 Author: alansley <[email protected]> Date: Thu Aug 29 08:16:09 2024 +1000 Updated DisappearingMessages.kt and HelpSettingsActivity.kt commit 5bd55ea Author: alansley <[email protected]> Date: Thu Aug 29 08:01:30 2024 +1000 Converted SwitchPreferenceCompat to Kotlin and fixed the BlockedDialog using the joinCommunity string for some bizarre reason commit d3fb440 Author: alansley <[email protected]> Date: Thu Aug 29 07:15:03 2024 +1000 Removed R.string.gif and replaced with a string constant commit ace58e3 Author: alansley <[email protected]> Date: Thu Aug 29 07:11:53 2024 +1000 getSubbedString correction commit 2a8f010 Merge: ce8efd7 116bef3 Author: alansley <[email protected]> Date: Wed Aug 28 16:31:43 2024 +1000 Merge branch 'compose-open-url-dialog' into strings-squashed commit ce8efd7 Author: alansley <[email protected]> Date: Wed Aug 28 16:31:11 2024 +1000 WIP commit 114066a Author: alansley <[email protected]> Date: Wed Aug 28 15:30:02 2024 +1000 Push before changing over all the Phrase.from to extension method calls commit 116bef3 Author: ThomasSession <[email protected]> Date: Wed Aug 28 15:25:03 2024 +1000 For safety commit 0b1a71a Author: ThomasSession <[email protected]> Date: Wed Aug 28 15:23:02 2024 +1000 Cleaning other use of old url dialog commit 20abbeb Author: ThomasSession <[email protected]> Date: Wed Aug 28 15:19:46 2024 +1000 Forgot !! commit 25132c6 Author: ThomasSession <[email protected]> Date: Wed Aug 28 15:13:58 2024 +1000 Proper set up for the Open URL dialog commit 1f68791 Author: alansley <[email protected]> Date: Wed Aug 28 14:35:05 2024 +1000 Replaced placeholder text with new string commit 8d97f31 Author: alansley <[email protected]> Date: Wed Aug 28 14:31:52 2024 +1000 Adjusted comment commit dfebe6f Author: alansley <[email protected]> Date: Wed Aug 28 14:25:23 2024 +1000 Moved block/unblock string selection logic into ViewModel and fixed a comment commit 736b531 Author: alansley <[email protected]> Date: Wed Aug 28 14:02:54 2024 +1000 Changed toast to warning - although condition to trigger should not be possible commit 413bc0b Author: alansley <[email protected]> Date: Wed Aug 28 13:55:04 2024 +1000 Adjusted EditGroupMembers to match iOS and fixed up save attachment commentary / logic commit ae7164e Merge: 5df981b d1c4283 Author: alansley <[email protected]> Date: Wed Aug 28 09:51:58 2024 +1000 Merge branch 'dev' into strings-squashed commit 2aa58f4 Author: alansley <[email protected]> Date: Wed Aug 28 08:27:03 2024 +1000 WIP compose openURL dialog commit 5df981b Author: alansley <[email protected]> Date: Tue Aug 27 15:51:38 2024 +1000 Adjusted NotificationRadioButton that takes string IDs to act as a pass-through commit 96453f1 Author: alansley <[email protected]> Date: Tue Aug 27 15:42:33 2024 +1000 Added some TODO markers for tomorrow commit a402a1b Author: alansley <[email protected]> Date: Tue Aug 27 15:33:55 2024 +1000 Adjusted Landing page string substitutions to cater for emojis commit 4809b54 Author: alansley <[email protected]> Date: Tue Aug 27 15:12:39 2024 +1000 Removed unused 'isEmpty' utility methods commit b52048a Author: alansley <[email protected]> Date: Tue Aug 27 14:42:57 2024 +1000 Addressed many aspects of PR feedback + misc. strings issues commit 9cdbc4b Author: alansley <[email protected]> Date: Tue Aug 27 09:50:51 2024 +1000 Adjusted strings as per Rebecca's 'String Changes' spreadsheet commit 4d7e4b9 Merge: 3c57605 1393335 Author: alansley <[email protected]> Date: Tue Aug 27 08:19:53 2024 +1000 Merge branch 'dev' into strings-squashed commit 3c57605 Author: alansley <[email protected]> Date: Mon Aug 26 17:11:45 2024 +1000 Moved into libsession for ease of access to control message view creation commit b908a54 Merge: 404fb80 bfbe4a8 Author: alansley <[email protected]> Date: Mon Aug 26 11:54:09 2024 +1000 Merge branch 'dev' into strings-squashed commit 404fb80 Author: alansley <[email protected]> Date: Mon Aug 26 11:52:41 2024 +1000 Performed a PR pass to fix up anything obvious - there's still a few things left TODO commit 53978f8 Author: Al Lansley <[email protected]> Date: Fri Aug 23 14:13:11 2024 +1000 Cleaned up HomeActivityTests.kt commit 5f82571 Merge: 69b8bd7 8deb21c Author: Al Lansley <[email protected]> Date: Fri Aug 23 08:59:21 2024 +1000 Merge branch 'dev' into strings-squashed commit 69b8bd7 Author: alansley <[email protected]> Date: Thu Aug 22 16:20:17 2024 +1000 Added back app_name string so app names properly, fixed API 28 save issue, made some buttons display as red if they should commit e3cab9c Author: alansley <[email protected]> Date: Thu Aug 22 14:26:48 2024 +1000 SS-75 Prevented ScrollView vertical scroll bar from fading out commit b0b8350 Author: alansley <[email protected]> Date: Thu Aug 22 14:07:49 2024 +1000 SS-64 Removed all 'Unblocked {name}' toasts as per instructions commit c3c35de Merge: efc2ee2 8e10e1a Author: alansley <[email protected]> Date: Thu Aug 22 13:43:00 2024 +1000 Merge branch 'dev' into strings-squashed commit efc2ee2 Author: alansley <[email protected]> Date: Thu Aug 22 13:40:59 2024 +1000 Added some comments about the new CrowdIn strings commit 7a03fb3 Author: alansley <[email protected]> Date: Thu Aug 22 13:08:03 2024 +1000 Initial integration of CrowdIn strings (English only) commit 9766c3f Author: alansley <[email protected]> Date: Thu Aug 22 09:55:14 2024 +1000 SS-75 Added 'Copied' toast when the user copies a URL in the Open URL dialog commit 59b4805 Author: alansley <[email protected]> Date: Thu Aug 22 09:51:01 2024 +1000 SS-75 Prevent 'Are you sure you want to open this URL?' dialog from being excessively tall when given a very long URL commit b7f627f Author: alansley <[email protected]> Date: Wed Aug 21 14:54:17 2024 +1000 Made closed group deleting-someone-elses msgs use 'Delete message' or 'Delete Messages' appropriately commit 69f6818 Author: alansley <[email protected]> Date: Wed Aug 21 13:53:58 2024 +1000 Adjusted SS-64 so that all Block / Unblock buttons now use that text and are displayed in red commit 2192c2c Merge: 2338bb4 eea54d1 Author: alansley <[email protected]> Date: Wed Aug 21 13:28:16 2024 +1000 Merge branch 'dev' into strings-squashed commit 2338bb4 Author: alansley <[email protected]> Date: Tue Aug 20 19:11:40 2024 +1000 Converted DefaultMessageNotifier to Kotlin because it needs adjustment & that Java is nasty commit 6b29e4d Author: alansley <[email protected]> Date: Tue Aug 20 17:53:27 2024 +1000 Added a note about the plurals for search results commit f7748a0 Author: alansley <[email protected]> Date: Tue Aug 20 16:06:24 2024 +1000 Corrected text on storage permission dialog commit f6b6256 Author: alansley <[email protected]> Date: Tue Aug 20 14:44:25 2024 +1000 Minor cleanup of BlockedContactsActivity commit e3d4870 Author: alansley <[email protected]> Date: Tue Aug 20 14:41:14 2024 +1000 Addressed changes to fix SS-64 / QA-146 - unblocking contacts modal & toast adjustments commit e812527 Merge: 5e02e1e 9919f71 Author: alansley <[email protected]> Date: Tue Aug 20 13:27:35 2024 +1000 Merge branch 'dev' into strings-squashed commit 5e02e1e Author: alansley <[email protected]> Date: Tue Aug 20 09:39:16 2024 +1000 Added 'NonTranslatableStringConstants' file commit 816f21b Author: alansley <[email protected]> Date: Tue Aug 20 09:30:30 2024 +1000 Addressed commit feedback & removed desktop string 'attachmentsClickToDownload' as we use 'attachmentsTapToDownload' commit acc8d47 Author: Al Lansley <[email protected]> Date: Mon Aug 19 16:22:08 2024 +1000 SES-1571 Large messages show warning toast commit 27ca77d Merge: 27bc90b f379604 Author: Al Lansley <[email protected]> Date: Mon Aug 19 11:19:27 2024 +1000 Merge branch 'dev' into strings-squashed commit 27bc90b Author: Al Lansley <[email protected]> Date: Mon Aug 19 08:59:38 2024 +1000 Cleaned up some comments and content description commit 558684a Merge: 90d7064 93a2890 Author: Al Lansley <[email protected]> Date: Mon Aug 19 08:41:47 2024 +1000 Merge branch 'dev' into strings-squashed commit 90d7064 Author: Al Lansley <[email protected]> Date: Thu Aug 15 12:13:30 2024 +1000 Fixed issue where new closed groups would display a timestamp instead of the 'groupNoMessages' text commit 51ef0ec Author: Al Lansley <[email protected]> Date: Thu Aug 15 09:45:28 2024 +1000 Replaced string 'CreateProfileActivity_profile_photo' with the string 'photo' which has the same text ('Photo') commit eecce08 Merge: 01009cf 5a248da Author: Al Lansley <[email protected]> Date: Thu Aug 15 09:38:10 2024 +1000 Merge branch 'dev' into strings-squashed commit 01009cf Author: Al Lansley <[email protected]> Date: Thu Aug 15 08:37:19 2024 +1000 Changed allowed emoji reactions per minute from 5 (which I used for testing) to 20 (production) commit 9441d1e Author: Al Lansley <[email protected]> Date: Thu Aug 15 08:34:16 2024 +1000 Refactored emoji rate limiter to use a timestamp mechanism rather than removing queue items after a delay commit 6cd6cc3 Author: alansley <[email protected]> Date: Wed Aug 14 16:48:07 2024 +1000 Adjusted emoji rate limit to 20 reactions per minute to match acceptance criteria commit edd154d Author: alansley <[email protected]> Date: Wed Aug 14 16:02:16 2024 +1000 SS-78 / SES-199 Mechanism required to limit emoji reaction rate commit a8ee5c9 Author: alansley <[email protected]> Date: Wed Aug 14 14:51:40 2024 +1000 Replaced hard-coded 'Session' with '{app_name}' in 'callsSessionCall' commit 621094e Author: alansley <[email protected]> Date: Wed Aug 14 13:40:01 2024 +1000 SS-72 Update save attachment models + add one-time warning that other apps can access saved attachments commit 0c83606 Author: alansley <[email protected]> Date: Tue Aug 13 15:50:35 2024 +1000 SS-75 Open URL modal change commit 802cf19 Author: Al Lansley <[email protected]> Date: Mon Aug 12 16:42:15 2024 +1000 Open or copy URL WIP commit ea84aa1 Author: Al Lansley <[email protected]> Date: Mon Aug 12 14:17:04 2024 +1000 Tied in bandDeleteAll string commit 93b8e74 Author: Al Lansley <[email protected]> Date: Mon Aug 12 11:34:03 2024 +1000 Job done! All Accessibility ID strings mapped and/or dealt with appropriately! commit fc3b4ad Author: Al Lansley <[email protected]> Date: Mon Aug 12 09:49:57 2024 +1000 Further AccessibilityId mapping & fixed group members counts to display correct details commit 558d674 Author: alansley <[email protected]> Date: Fri Aug 9 17:24:44 2024 +1000 End of day push commit 73fdb16 Author: alansley <[email protected]> Date: Fri Aug 9 15:57:06 2024 +1000 Localised time strings working - even if the unit tests aren't commit 436175d Author: alansley <[email protected]> Date: Fri Aug 9 13:54:09 2024 +1000 Relative time string WIP commit f309263 Merge: 45c4118 007e705 Author: alansley <[email protected]> Date: Fri Aug 9 11:39:13 2024 +1000 Merge dev commit 45c4118 Author: Al Lansley <[email protected]> Date: Thu Aug 8 16:43:02 2024 +1000 Further AccessibilityId mapping WIP commit 31bac8e Author: Al Lansley <[email protected]> Date: Thu Aug 8 10:53:30 2024 +1000 Further accessibility ID changes & removed fragment_new_conversation_home.xml commit 9c2111e Author: alansley <[email protected]> Date: Wed Aug 7 13:13:52 2024 +1000 AccessibilityId WIP commit 1e9eeff Author: alansley <[email protected]> Date: Wed Aug 7 11:06:39 2024 +1000 AccessibilityId adjustments & removed some unused XML layouts commit e5fd2c8 Author: alansley <[email protected]> Date: Wed Aug 7 09:22:14 2024 +1000 AccessibilityId refactor WIP commit 399796b Author: alansley <[email protected]> Date: Tue Aug 6 15:51:53 2024 +1000 AccessibilityId WIP - up to AccessibilityId_reveal_recovery_phrase_button commit a8d72df Author: alansley <[email protected]> Date: Tue Aug 6 14:12:10 2024 +1000 Cleaned up a few comments and fixed some plurals logic commit be400d8 Author: alansley <[email protected]> Date: Tue Aug 6 11:32:08 2024 +1000 Removed commented out merge conflict marker commit 5cbe289 Merge: 5fe123e d6c5ab2 Author: alansley <[email protected]> Date: Tue Aug 6 11:30:50 2024 +1000 Merge dev and cleanup commit 5fe123e Author: Al Lansley <[email protected]> Date: Mon Aug 5 14:37:47 2024 +1000 Adjusted sending of mms messages to show 'Uploading' rather than 'Sending' as per SES-1721 commit d3f8e92 Merge: 0055293 cd1a064 Author: Al Lansley <[email protected]> Date: Mon Aug 5 13:30:03 2024 +1000 Merge branch 'dev' into strings-squashed commit 0055293 Author: Al Lansley <[email protected]> Date: Mon Aug 5 13:28:55 2024 +1000 Removed unused helpReportABugDesktop strings commit 6c0450b Author: Al Lansley <[email protected]> Date: Mon Aug 5 12:59:15 2024 +1000 Renamed 'quitButton' string to just 'quit' commit 284c485 Author: Al Lansley <[email protected]> Date: Mon Aug 5 12:00:35 2024 +1000 Replaced 'screenSecurity' with 'screenshotNotifications' as the title of the notifications toggle commit 6948d64 Author: Al Lansley <[email protected]> Date: Mon Aug 5 10:45:05 2024 +1000 WIP commit bc94cb7 Author: alansley <[email protected]> Date: Fri Aug 2 16:21:16 2024 +1000 End of day push commit 1a2df37 Merge: c7fdb6a a56e1d0 Author: alansley <[email protected]> Date: Fri Aug 2 15:20:19 2024 +1000 Merged dev commit c7fdb6a Author: alansley <[email protected]> Date: Fri Aug 2 14:21:11 2024 +1000 Replaced string 'dialog_disappearing_messages_follow_setting_confirm' with 'confirm' commit 2992d59 Author: alansley <[email protected]> Date: Fri Aug 2 14:01:00 2024 +1000 Removed string 'attachment_type_selector__gallery' and associated / un-used 'attachment_type_selector.xml' layout commit 4218663 Author: alansley <[email protected]> Date: Fri Aug 2 13:39:54 2024 +1000 Removed 'message_details_header__disappears' and the unused 'activity_message_detail.xml' which was the only reference to it commit ba2d027 Author: alansley <[email protected]> Date: Fri Aug 2 12:15:42 2024 +1000 Implemented task SS-79 to only provide a save attachment menu option when the attachment download is complete commit 20662c8 Merge: 608c984 fbbef48 Author: alansley <[email protected]> Date: Wed Jul 31 13:08:04 2024 +1000 Merge branch 'dev' into strings-squashed commit 608c984 Author: alansley <[email protected]> Date: Tue Jul 30 16:58:08 2024 +1000 Actually remove the 4 specific time period mute strings commit 006a4e8 Author: alansley <[email protected]> Date: Tue Jul 30 16:43:54 2024 +1000 Cleaned up MuteDialog.kt commit d3177f9 Author: alansley <[email protected]> Date: Tue Jul 30 16:27:06 2024 +1000 Added a 1 second kludge to the mute for subtitle so that it initially shows 1 hour not 59 minutes etc. commit d568a86 Author: alansley <[email protected]> Date: Tue Jul 30 16:20:20 2024 +1000 Removed 'Muted for' strings and fixed it up to use 'Mute for {large_time_unit}' across the board commit 84f6f19 Author: alansley <[email protected]> Date: Tue Jul 30 11:03:46 2024 +1000 Changed some hard-coded 'Session' text in strings and renamed another commit bc90d18 Author: alansley <[email protected]> Date: Tue Jul 30 10:27:55 2024 +1000 Cleaned up a leftover plural & changed 'app_name' to use 'sessionMessenger' string commit 79cd878 Merge: 3b62e47 dec02ce Author: alansley <[email protected]> Date: Tue Jul 30 08:16:02 2024 +1000 Merge branch 'dev' into strings-squashed commit 3b62e47 Author: Al Lansley <[email protected]> Date: Mon Jul 29 16:33:21 2024 +1000 Down to just the final few straggler strings commit 13e81f0 Author: Al Lansley <[email protected]> Date: Mon Jul 29 13:13:54 2024 +1000 WIP commit 2d9961d Author: Al Lansley <[email protected]> Date: Mon Jul 29 08:58:01 2024 +1000 Further cleanup of stragglers commit 08b8a84 Author: Al Lansley <[email protected]> Date: Mon Jul 29 08:29:12 2024 +1000 Cleaning up straggler strings commit d0e87c6 Author: alansley <[email protected]> Date: Fri Jul 26 17:07:46 2024 +1000 WIP commit 4bc9d09 Author: alansley <[email protected]> Date: Fri Jul 26 16:30:28 2024 +1000 WIP commit 3cee4bc Merge: aa1db13 a495ec2 Author: alansley <[email protected]> Date: Fri Jul 26 13:57:09 2024 +1000 Removed some legacy strings & substituted others commit aa1db13 Author: fanchao <[email protected]> Date: Fri Jul 26 11:34:05 2024 +1000 Initial squash merge for strings
1 parent d1c4283 commit 67bcc93

File tree

667 files changed

+25483
-69013
lines changed

Some content is hidden

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

667 files changed

+25483
-69013
lines changed

app/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,13 @@ android {
221221
}
222222

223223
dependencies {
224+
implementation project(':content-descriptions')
224225

225-
implementation("com.google.dagger:hilt-android:$daggerHiltVersion")
226-
ksp("com.google.dagger:hilt-compiler:$daggerHiltVersion")
227226
ksp("androidx.hilt:hilt-compiler:$jetpackHiltVersion")
227+
ksp("com.google.dagger:hilt-compiler:$daggerHiltVersion")
228+
ksp("com.github.bumptech.glide:ksp:$glideVersion")
228229

230+
implementation("com.google.dagger:hilt-android:$daggerHiltVersion")
229231
implementation "androidx.appcompat:appcompat:$appcompatVersion"
230232
implementation 'androidx.recyclerview:recyclerview:1.2.1'
231233
implementation "com.google.android.material:material:$materialVersion"
@@ -249,12 +251,15 @@ dependencies {
249251
implementation 'androidx.fragment:fragment-ktx:1.5.3'
250252
implementation "androidx.core:core-ktx:$coreVersion"
251253
implementation "androidx.work:work-runtime-ktx:2.7.1"
254+
252255
playImplementation ("com.google.firebase:firebase-messaging:24.0.0") {
253256
exclude group: 'com.google.firebase', module: 'firebase-core'
254257
exclude group: 'com.google.firebase', module: 'firebase-analytics'
255258
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
256259
}
260+
257261
if (project.hasProperty('huawei')) huaweiImplementation 'com.huawei.hms:push:6.7.0.300'
262+
258263
implementation 'androidx.media3:media3-exoplayer:1.4.0'
259264
implementation 'androidx.media3:media3-ui:1.4.0'
260265
implementation 'org.conscrypt:conscrypt-android:2.5.2'
@@ -268,7 +273,6 @@ dependencies {
268273
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
269274
implementation "com.github.bumptech.glide:glide:$glideVersion"
270275
implementation "com.github.bumptech.glide:compose:1.0.0-beta01"
271-
ksp "com.github.bumptech.glide:ksp:$glideVersion"
272276
implementation 'com.makeramen:roundedimageview:2.1.0'
273277
implementation 'com.pnikosis:materialish-progress:1.5'
274278
implementation 'org.greenrobot:eventbus:3.0.0'

app/src/androidTest/java/network/loki/messenger/HomeActivityTests.kt

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package network.loki.messenger
22

33
import android.Manifest
44
import android.app.Instrumentation
5-
import android.content.ClipboardManager
6-
import android.content.Context
75
import android.view.View
86
import androidx.test.espresso.Espresso.onView
97
import androidx.test.espresso.Espresso.pressBack
@@ -16,15 +14,14 @@ import androidx.test.espresso.matcher.ViewMatchers.isDescendantOfA
1614
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
1715
import androidx.test.espresso.matcher.ViewMatchers.isRoot
1816
import androidx.test.espresso.matcher.ViewMatchers.withId
19-
import androidx.test.espresso.matcher.ViewMatchers.withSubstring
20-
import androidx.test.espresso.matcher.ViewMatchers.withText
2117
import androidx.test.ext.junit.rules.ActivityScenarioRule
2218
import androidx.test.ext.junit.runners.AndroidJUnit4
2319
import androidx.test.filters.LargeTest
2420
import androidx.test.platform.app.InstrumentationRegistry
2521
import androidx.test.uiautomator.By
2622
import androidx.test.uiautomator.UiDevice
2723
import com.adevinta.android.barista.interaction.PermissionGranter
24+
import com.bumptech.glide.Glide
2825
import network.loki.messenger.util.InputBarButtonDrawableMatcher.Companion.inputButtonWithDrawable
2926
import org.hamcrest.Matcher
3027
import org.hamcrest.Matchers.allOf
@@ -36,11 +33,9 @@ import org.junit.Test
3633
import org.junit.runner.RunWith
3734
import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview
3835
import org.session.libsession.utilities.TextSecurePreferences
39-
import org.session.libsignal.utilities.guava.Optional
4036
import org.thoughtcrime.securesms.conversation.v2.ConversationActivityV2
4137
import org.thoughtcrime.securesms.conversation.v2.input_bar.InputBar
4238
import org.thoughtcrime.securesms.home.HomeActivity
43-
import com.bumptech.glide.Glide
4439

4540
/**
4641
* Currently not used as part of our CI/Deployment processes !!!!
@@ -62,7 +57,6 @@ class HomeActivityTests {
6257
@Before
6358
fun setUp() {
6459
InstrumentationRegistry.getInstrumentation().addMonitor(activityMonitor)
65-
6660
}
6761

6862
@After
@@ -96,10 +90,10 @@ class HomeActivityTests {
9690
device.pressKeyCode(67)
9791

9892
// Continue with display name
99-
objectFromDesc(R.string.continue_2).click()
93+
objectFromDesc(R.string.theContinue).click()
10094

10195
// Continue with default push notification setting
102-
objectFromDesc(R.string.continue_2).click()
96+
objectFromDesc(R.string.theContinue).click()
10397

10498
// PN select
10599
if (hasViewedSeed) {
@@ -110,7 +104,6 @@ class HomeActivityTests {
110104
PermissionGranter.allowPermissionsIfNeeded(Manifest.permission.POST_NOTIFICATIONS)
111105
}
112106

113-
114107
/* private fun goToMyChat() {
115108
onView(withId(R.id.newConversationButton)).perform(ViewActions.click())
116109
onView(withId(R.id.createPrivateChatButton)).perform(ViewActions.click())
@@ -131,7 +124,7 @@ class HomeActivityTests {
131124
@Test
132125
fun testLaunches_dismiss_seedView() {
133126
setupLoggedInState()
134-
objectFromDesc(R.string.continue_2).click()
127+
objectFromDesc(R.string.theContinue).click()
135128
objectFromDesc(R.string.copy).click()
136129
pressBack()
137130
onView(withId(R.id.seedReminderView)).check(matches(not(isDisplayed())))
@@ -182,6 +175,7 @@ class HomeActivityTests {
182175
onView(withText(dialogPromptText)).check(matches(isDisplayed()))
183176
}*/
184177

178+
185179
/**
186180
* Perform action of waiting for a specific time.
187181
*/
@@ -198,5 +192,4 @@ class HomeActivityTests {
198192
}
199193
}
200194
}
201-
202195
}

app/src/main/AndroidManifest.xml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
3838
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"/>
3939
<uses-permission android:name="network.loki.messenger.ACCESS_SESSION_SECRETS" />
40-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
40+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- Only used on Android API 29 and lower -->
4141
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
4242
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
4343
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
@@ -79,7 +79,7 @@
7979
android:networkSecurityConfig="@xml/network_security_configuration"
8080
android:supportsRtl="true"
8181
android:theme="@style/Theme.Session.DayNight"
82-
tools:replace="android:allowBackup">
82+
tools:replace="android:allowBackup,android:label" >
8383

8484
<!-- Disable all analytics -->
8585

@@ -130,12 +130,12 @@
130130
<activity
131131
android:name="org.thoughtcrime.securesms.messagerequests.MessageRequestsActivity"
132132
android:exported="false"
133-
android:label="@string/activity_message_requests_title"
133+
android:label="@string/sessionMessageRequests"
134134
android:screenOrientation="portrait" />
135135
<activity
136136
android:name="org.thoughtcrime.securesms.preferences.SettingsActivity"
137137
android:screenOrientation="portrait"
138-
android:label="@string/activity_settings_title" />
138+
android:label="@string/sessionSettings" />
139139
<activity
140140
android:name="org.thoughtcrime.securesms.debugmenu.DebugActivity"
141141
android:screenOrientation="portrait"
@@ -151,11 +151,11 @@
151151
android:name="org.thoughtcrime.securesms.preferences.BlockedContactsActivity"
152152
android:screenOrientation="portrait"
153153
android:theme="@style/Theme.Session.DayNight.FlatActionBar"
154-
android:label="@string/blocked_contacts_title"
154+
android:label="@string/conversationsBlockedContacts"
155155
/>
156156
<activity
157157
android:name="org.thoughtcrime.securesms.groups.EditClosedGroupActivity"
158-
android:label="@string/activity_edit_closed_group_title"
158+
android:label="@string/groupEdit"
159159
android:screenOrientation="portrait" />
160160
<activity
161161
android:name="org.thoughtcrime.securesms.recoverypassword.RecoveryPasswordActivity"
@@ -165,7 +165,7 @@
165165
android:screenOrientation="portrait" />
166166
<activity
167167
android:name="org.thoughtcrime.securesms.preferences.PrivacySettingsActivity"
168-
android:label="@string/activity_privacy_settings_title"
168+
android:label="@string/sessionPrivacy"
169169
android:screenOrientation="portrait" />
170170
<activity
171171
android:name="org.thoughtcrime.securesms.preferences.NotificationSettingsActivity"
@@ -175,7 +175,7 @@
175175
android:screenOrientation="portrait" />
176176
<activity
177177
android:name="org.thoughtcrime.securesms.preferences.HelpSettingsActivity"
178-
android:label="@string/activity_help_settings_title"
178+
android:label="@string/sessionHelp"
179179
android:screenOrientation="portrait" />
180180
<activity android:name="org.thoughtcrime.securesms.preferences.appearance.AppearanceSettingsActivity"
181181
android:screenOrientation="portrait"/>
@@ -268,18 +268,10 @@
268268
<activity
269269
android:name="org.thoughtcrime.securesms.MediaPreviewActivity"
270270
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
271-
android:label="@string/AndroidManifest__media_preview"
272271
android:screenOrientation="portrait"
273272
android:theme="@style/Theme.Session.DayNight.NoActionBar"
274273
android:launchMode="singleTask"
275274
android:windowSoftInputMode="stateHidden" />
276-
<activity
277-
android:name="org.thoughtcrime.securesms.MediaOverviewActivity"
278-
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
279-
android:launchMode="singleTask"
280-
android:screenOrientation="portrait"
281-
android:theme="@style/Theme.Session.DayNight.NoActionBar"
282-
android:windowSoftInputMode="stateHidden" />
283275
<activity
284276
android:name="org.thoughtcrime.securesms.DummyActivity"
285277
android:allowTaskReparenting="true"

app/src/main/java/org/thoughtcrime/securesms/DeleteMediaDialog.kt

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,8 @@ class DeleteMediaDialog {
88
@JvmStatic
99
fun show(context: Context, recordCount: Int, doDelete: Runnable) = context.showSessionDialog {
1010
iconAttribute(R.attr.dialog_alert_icon)
11-
title(
12-
context.resources.getQuantityString(
13-
R.plurals.MediaOverviewActivity_Media_delete_confirm_title,
14-
recordCount,
15-
recordCount
16-
)
17-
)
18-
text(
19-
context.resources.getQuantityString(R.plurals.MediaOverviewActivity_Media_delete_confirm_message,
20-
recordCount,
21-
recordCount
22-
)
23-
)
11+
title(context.resources.getQuantityString(R.plurals.deleteMessage, recordCount, recordCount))
12+
text(context.resources.getString(R.string.deleteMessageDescriptionEveryone))
2413
button(R.string.delete) { doDelete.run() }
2514
cancelButton()
2615
}

app/src/main/java/org/thoughtcrime/securesms/DeleteMediaPreviewDialog.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ class DeleteMediaPreviewDialog {
99
fun show(context: Context, doDelete: Runnable) {
1010
context.showSessionDialog {
1111
iconAttribute(R.attr.dialog_alert_icon)
12-
title(R.string.MediaPreviewActivity_media_delete_confirmation_title)
13-
text(R.string.MediaPreviewActivity_media_delete_confirmation_message)
14-
button(R.string.delete) { doDelete.run() }
12+
title(context.resources.getQuantityString(R.plurals.deleteMessage, 1, 1))
13+
text(R.string.deleteMessageDescriptionEveryone)
14+
dangerButton(R.string.delete) { doDelete.run() }
1515
cancelButton()
1616
}
1717
}

0 commit comments

Comments
 (0)