fixed code warnings

tweaking travis config
This commit is contained in:
Mariotaku Lee 2017-03-05 00:35:14 +08:00
parent 0e7d8c5ed5
commit b48ae2ac42
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
2 changed files with 2 additions and 4 deletions

View File

@ -73,7 +73,7 @@ before_script:
- test -f twidere/src/google/AndroidManifest.xml
script:
- ./gradlew clean build
- ./gradlew clean assembleGoogle
after_failure:
- travis/scripts/print_error_logs.sh

View File

@ -370,13 +370,11 @@ class QuickSearchBarActivity : BaseActivity(), OnClickListener, LoaderCallbacks<
}
override fun swapCursor(newCursor: Cursor?): Cursor? {
indices = if (newCursor != null) SuggestionItem.Indices(newCursor) else null
removedPositions!!.clear()
indices = newCursor?.let(SuggestionItem::Indices)
return super.swapCursor(newCursor)
}
override fun getCount(): Int {
if (removedPositions == null) return super.getCount()
return super.getCount() - removedPositions.size()
}