mirror of
				https://github.com/recloudstream/cloudstream.git
				synced 2024-08-15 01:53:11 +00:00 
			
		
		
		
	Probable fix for Fire TV home provider categories selection
This commit is contained in:
		
							parent
							
								
									2a6d20cab4
								
							
						
					
					
						commit
						3bea7f01ef
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		|  | @ -352,11 +352,25 @@ class HomeFragment : Fragment() { | |||
|                     arrayAdapter.notifyDataSetChanged() | ||||
|                 } | ||||
| 
 | ||||
|                 /** | ||||
|                  * Since fire tv is fucked we need to manually define the focus layout. | ||||
|                  * Since visible buttons are only known in runtime this is required. | ||||
|                  **/ | ||||
|                 var lastButton: MaterialButton? = null | ||||
| 
 | ||||
|                 for ((button, validTypes) in pairList) { | ||||
|                     val isValid = | ||||
|                         validAPIs.any { api -> validTypes.any { api.supportedTypes.contains(it) } } | ||||
|                     button?.isVisible = isValid | ||||
|                     if (isValid) { | ||||
| 
 | ||||
|                         // Set focus navigation | ||||
|                         button?.let { currentButton -> | ||||
|                             lastButton?.nextFocusRightId = currentButton.id | ||||
|                             lastButton?.id?.let { currentButton.nextFocusLeftId = it } | ||||
|                             lastButton = currentButton | ||||
|                         } | ||||
| 
 | ||||
|                         fun buttonContains(): Boolean { | ||||
|                             return preSelectedTypes.any { validTypes.contains(it) } | ||||
|                         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue