mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-30 23:16:09 +00:00 
			
		
		
		
	Correctif rapide bookmarks en attendant refonte
This commit is contained in:
		
							parent
							
								
									1bc5b614c0
								
							
						
					
					
						commit
						1ea384afaf
					
				
					 1 changed files with 14 additions and 3 deletions
				
			
		|  | @ -243,15 +243,26 @@ namespace AideDeJeu.ViewModels.Library | ||||||
|             } |             } | ||||||
|             items.Add(linkItem); |             items.Add(linkItem); | ||||||
|             await SaveBookmarksAsync(key, items); |             await SaveBookmarksAsync(key, items); | ||||||
|  |             if (Repository.BookmarkCollectionNames.IndexOf(key) >= 0) | ||||||
|  |             { | ||||||
|                 Repository.BookmarkCollectionIndex = Repository.BookmarkCollectionNames.IndexOf(key); |                 Repository.BookmarkCollectionIndex = Repository.BookmarkCollectionNames.IndexOf(key); | ||||||
|  |             } | ||||||
|  |             else | ||||||
|  |             { | ||||||
|  |                 Repository.BookmarkCollectionNames.Insert(Repository.BookmarkCollectionNames.Count - 1, key); | ||||||
|  |                 Repository.BookmarkCollectionIndex = Repository.BookmarkCollectionNames.IndexOf(key); | ||||||
|  |             } | ||||||
|             await LoadBookmarkCollectionAsync(key); |             await LoadBookmarkCollectionAsync(key); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public async Task SaveBookmarksAsync() |         public async Task SaveBookmarksAsync() | ||||||
|  |         { | ||||||
|  |             if (Repository.BookmarkCollectionIndex >= 0) | ||||||
|             { |             { | ||||||
|                 App.Current.Properties[Repository.BookmarkCollectionNames[Repository.BookmarkCollectionIndex]] = ToString(Repository.BookmarkCollection); |                 App.Current.Properties[Repository.BookmarkCollectionNames[Repository.BookmarkCollectionIndex]] = ToString(Repository.BookmarkCollection); | ||||||
|                 await App.Current.SavePropertiesAsync(); |                 await App.Current.SavePropertiesAsync(); | ||||||
|             } |             } | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         public async Task SaveBookmarksAsync(string key, List<Item> items) |         public async Task SaveBookmarksAsync(string key, List<Item> items) | ||||||
|         { |         { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez