private inline suspend fun <AddingItem : TimelineItem, RemovingItem : TimelineItem> shouldSyncType(imsProject: IMSProject, finalBlock: List<TimelineItem>, relevantTimeline: List<TimelineItem>, restoresDefaultState: Boolean, virtualIDs: Map<TimelineItem, String>): Boolean

Check if TimelineItem should be synced or ignored

Return

true if and only if there are unsynced changes that should be synced to GitHub

Parameters

finalBlock

the last block of similar items that should be checked for syncing

relevantTimeline

Sorted part of the timeline containing only TimelineItems interacting with finalBlock

restoresDefaultState

if the timeline item converges the state of the issue towards the state of an empty issue

virtualIDs

mapping for timeline items that are geerated with generated ids and do not exist in the database

Type Parameters

AddingItem

Item type with the same semantic as the item to add

RemovingItem

Item type invalidating the AddingItem


private suspend fun shouldSyncType(imsProject: IMSProject, isAddingItem: suspend (TimelineItem) -> Boolean, isRemovingItem: suspend (TimelineItem) -> Boolean, finalBlock: List<TimelineItem>, relevantTimeline: List<TimelineItem>, restoresDefaultState: Boolean, virtualIDs: Map<TimelineItem, String> = mapOf()): Boolean

Check if TimelineItem should be synced or ignored

Return

true if and only if there are unsynced changes that should be synced to GitHub

Parameters

imsProject

IMS project to sync

isAddingItem

filter for items with the same semantic as the item to add

isRemovingItem

filter for items invalidating the items matching isAddingItem

finalBlock

the last block of similar items that should be checked for syncing

relevantTimeline

Sorted part of the timeline containing only TimelineItems interacting with finalBlock

restoresDefaultState

if the timeline item converges the state of the issue towards the state of an empty issue

virtualIDs

mapping for timeline items that are geerated with generated ids and do not exist in the database