Fixed scroll position not resetting when selecting different files in diff
This commit is contained in:
parent
8b74329fb0
commit
86316fca9f
@ -90,10 +90,12 @@ class DiffViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If it's a different file or different state (index or workdir), reset the scroll state
|
// If it's a different file or different state (index or workdir), reset the scroll state
|
||||||
if (oldDiffEntryType != null &&
|
if (
|
||||||
|
oldDiffEntryType?.filePath != diffEntryType.filePath ||
|
||||||
oldDiffEntryType is DiffEntryType.UncommitedDiff &&
|
oldDiffEntryType is DiffEntryType.UncommitedDiff &&
|
||||||
diffEntryType is DiffEntryType.UncommitedDiff &&
|
diffEntryType is DiffEntryType.UncommitedDiff &&
|
||||||
oldDiffEntryType.statusEntry.filePath != diffEntryType.statusEntry.filePath
|
oldDiffEntryType.statusEntry.filePath == diffEntryType.statusEntry.filePath &&
|
||||||
|
oldDiffEntryType::class != diffEntryType::class
|
||||||
) {
|
) {
|
||||||
lazyListState.value = LazyListState(
|
lazyListState.value = LazyListState(
|
||||||
0,
|
0,
|
||||||
|
Loading…
Reference in New Issue
Block a user