mirror of
				https://github.com/SimpleMobileTools/Simple-Launcher.git
				synced 2025-06-05 21:59:15 +02:00 
			
		
		
		
	always redraw icons after fetching just to avoid some glitches
This commit is contained in:
		| @@ -70,7 +70,7 @@ class MainActivity : SimpleActivity(), FlingListener { | |||||||
|             ensureBackgroundThread { |             ensureBackgroundThread { | ||||||
|                 getDefaultAppPackages() |                 getDefaultAppPackages() | ||||||
|                 config.wasHomeScreenInit = true |                 config.wasHomeScreenInit = true | ||||||
|                 home_screen_grid.fetchAppIcons(true) |                 home_screen_grid.fetchAppIcons() | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -38,10 +38,10 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie | |||||||
|             textSize = context.resources.getDimension(R.dimen.normal_text_size) |             textSize = context.resources.getDimension(R.dimen.normal_text_size) | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         fetchAppIcons(false) |         fetchAppIcons() | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     fun fetchAppIcons(forceRedraw: Boolean) { |     fun fetchAppIcons() { | ||||||
|         ensureBackgroundThread { |         ensureBackgroundThread { | ||||||
|             appIcons = context.homeScreenGridItemsDB.getAllItems() as ArrayList<HomeScreenGridItem> |             appIcons = context.homeScreenGridItemsDB.getAllItems() as ArrayList<HomeScreenGridItem> | ||||||
|             appIcons.forEach { item -> |             appIcons.forEach { item -> | ||||||
| @@ -51,9 +51,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie | |||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             if (forceRedraw) { |             invalidate() | ||||||
|                 invalidate() |  | ||||||
|             } |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user