mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-30 04:01:31 +08:00 
			
		
		
		
	fix sync skipping some changes and then forcing sector queuing
This commit is contained in:
		
							parent
							
								
									1995b54770
								
							
						
					
					
						commit
						be59f248e8
					
				| @ -44,7 +44,7 @@ find $DIR/node_modules -name demo -exec rm -rf {} \; | |||||||
| 
 | 
 | ||||||
| find $DIR/libraries -name "*.map" -type f -delete | find $DIR/libraries -name "*.map" -type f -delete | ||||||
| 
 | 
 | ||||||
| rm -r $DIR/src/public/app | rm -rf $DIR/src/public/app | ||||||
| 
 | 
 | ||||||
| sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' $DIR/src/views/desktop.ejs | sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' $DIR/src/views/desktop.ejs | ||||||
| sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' $DIR/src/views/mobile.ejs | sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' $DIR/src/views/mobile.ejs | ||||||
|  | |||||||
| @ -149,8 +149,8 @@ async function pullChanges(syncContext) { | |||||||
| 
 | 
 | ||||||
|         sql.transactional(() => { |         sql.transactional(() => { | ||||||
|             for (const {entityChange, entity} of entityChanges) { |             for (const {entityChange, entity} of entityChanges) { | ||||||
|                 const changeAppliedAlready = !entityChange.changeId |                 const changeAppliedAlready = entityChange.changeId | ||||||
|                     || !!sql.getValue("SELECT id FROM entity_changes WHERE changeId = ?", [entityChange.changeId]); |                     && !!sql.getValue("SELECT id FROM entity_changes WHERE changeId = ?", [entityChange.changeId]); | ||||||
| 
 | 
 | ||||||
|                 if (!changeAppliedAlready && !sourceIdService.isLocalSourceId(entityChange.sourceId)) { |                 if (!changeAppliedAlready && !sourceIdService.isLocalSourceId(entityChange.sourceId)) { | ||||||
|                     if (!atLeastOnePullApplied) { // send only for first
 |                     if (!atLeastOnePullApplied) { // send only for first
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam