1.8 fixes (#637)

* fix lint warnings

* upgrade dependencies

* auto cancel notifications

* improve dependency injection

* fix tests

* remove old comment from BaseActivity

* fix missing injectors
This commit is contained in:
Konrad Pozniak 2018-05-08 19:15:10 +02:00 committed by GitHub
commit 27b4cf8739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 34 additions and 135 deletions

View file

@ -282,22 +282,19 @@ class BottomSheetActivityTest {
override fun request(): Request { throw NotImplementedError() }
}
class FakeBottomSheetActivity(val api: MastodonApi) : BottomSheetActivity() {
class FakeBottomSheetActivity(api: MastodonApi) : BottomSheetActivity() {
var status: Status? = null
var accountId: String? = null
var link: String? = null
init {
mastodonApi = api
@Suppress("UNCHECKED_CAST")
bottomSheet = Mockito.mock(BottomSheetBehavior::class.java) as BottomSheetBehavior<LinearLayout>
callList = arrayListOf()
}
override fun getMastodonApi(): MastodonApi {
return api
}
override fun openLink(url: String) {
this.link = url
}