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:
parent
eea8b53617
commit
bf6d7a6b97
4 changed files with 1268 additions and 1529 deletions
|
@ -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
File diff suppressed because it is too large
Load diff
|
@ -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?
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue