|
|
|
@ -75,7 +75,6 @@ import com.keylesspalace.tusky.util.ListUtils; |
|
|
|
|
import com.keylesspalace.tusky.util.NotificationTypeConverterKt; |
|
|
|
|
import com.keylesspalace.tusky.util.PairedList; |
|
|
|
|
import com.keylesspalace.tusky.util.StatusDisplayOptions; |
|
|
|
|
import com.keylesspalace.tusky.util.ThemeUtils; |
|
|
|
|
import com.keylesspalace.tusky.util.ViewDataUtils; |
|
|
|
|
import com.keylesspalace.tusky.view.BackgroundMessageView; |
|
|
|
|
import com.keylesspalace.tusky.view.EndlessOnScrollListener; |
|
|
|
@ -1275,7 +1274,9 @@ public class NotificationsFragment extends SFragment implements |
|
|
|
|
if (isAdded()) { |
|
|
|
|
adapter.notifyItemRangeInserted(position, count); |
|
|
|
|
Context context = getContext(); |
|
|
|
|
if (position == 0 && context != null) { |
|
|
|
|
// scroll up when new items at the top are loaded while being at the start
|
|
|
|
|
// https://github.com/tuskyapp/Tusky/pull/1905#issuecomment-677819724
|
|
|
|
|
if (position == 0 && context != null && adapter.getItemCount() != count) { |
|
|
|
|
recyclerView.scrollBy(0, Utils.dpToPx(context, -30)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|