File tree 4 files changed +5
-5
lines changed
androidTest/java/fr/free/nrw/commons
main/java/fr/free/nrw/commons
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ class AboutActivityTest {
105
105
fun testLaunchTranslate () {
106
106
Espresso .onView(ViewMatchers .withId(R .id.about_translate)).perform(ViewActions .click())
107
107
Espresso .onView(ViewMatchers .withId(android.R .id.button1)).perform(ViewActions .click())
108
- val langCode = CommonsApplication .instance!! .languageLookUpTable!! .codes[0 ]
108
+ val langCode = CommonsApplication .instance.languageLookUpTable.codes[0 ]
109
109
Intents .intended(
110
110
CoreMatchers .allOf(
111
111
IntentMatchers .hasAction(Intent .ACTION_VIEW ),
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ class CommonsApplication : MultiDexApplication() {
85
85
@Inject
86
86
lateinit var customOkHttpNetworkFetcher: CustomOkHttpNetworkFetcher
87
87
88
- var languageLookUpTable: AppLanguageLookUpTable ? = null
88
+ lateinit var languageLookUpTable: AppLanguageLookUpTable
89
89
private set
90
90
91
91
@Inject
@@ -386,7 +386,7 @@ class CommonsApplication : MultiDexApplication() {
386
386
*/
387
387
388
388
@JvmStatic
389
- var instance: CommonsApplication ? = null
389
+ lateinit var instance: CommonsApplication
390
390
private set
391
391
392
392
@JvmField
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class ThanksClient
32
32
revisionId.toString(), // Rev
33
33
null , // Log
34
34
csrfTokenClient.getTokenBlocking(), // Token
35
- CommonsApplication .instance!! .userAgent, // Source
35
+ CommonsApplication .instance.userAgent, // Source
36
36
).map { mwThankPostResponse ->
37
37
mwThankPostResponse.result?.success == 1
38
38
}
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ class UploadWorker(
438
438
username,
439
439
)
440
440
CommonsApplication
441
- .instance!!
441
+ .instance
442
442
.clearApplicationData(appContext, logoutListener)
443
443
}
444
444
}
You can’t perform that action at this time.
0 commit comments