Convert TimelineFragment to Kotlin & ViewBinding (#2131)

* convert TimelineFragment to Kotlin

* cleanup some code

* migrate to viewbinding

* cleanup even more code

* address review feedback

* improve findStatusOrReblogPositionById
This commit is contained in:
Konrad Pozniak 2021-04-22 18:48:16 +02:00 committed by GitHub
parent eea8b53617
commit bf6d7a6b97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1268 additions and 1529 deletions

View file

@ -511,7 +511,7 @@ public abstract class SFragment extends Fragment implements Injectable {
});
}
@VisibleForTesting
@VisibleForTesting(otherwise = VisibleForTesting.PROTECTED)
public void reloadFilters(boolean forceRefresh) {
if (filters != null && !forceRefresh) {
applyFilters(forceRefresh);
@ -547,7 +547,7 @@ public abstract class SFragment extends Fragment implements Injectable {
// Override to refresh your fragment
}
@VisibleForTesting
@VisibleForTesting(otherwise = VisibleForTesting.PROTECTED)
public boolean shouldFilterStatus(Status status) {
if (filterRemoveRegex && status.getPoll() != null) {

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@ import com.keylesspalace.tusky.viewdata.StatusViewData
import kotlin.math.min
// Not using lambdas because there's boxing of int then
interface StatusProvider {
fun interface StatusProvider {
fun getStatus(pos: Int): StatusViewData?
}