mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Merge pull request #10576 from AudricV/fix-npe-feed-new-items-button
Fix crash when setting the masking of the new feed items button if the context is null
This commit is contained in:
		| @@ -607,9 +607,13 @@ class FeedFragment : BaseStateFragment<FeedState>() { | |||||||
|                 execOnEnd = { |                 execOnEnd = { | ||||||
|                     // Disabled animations would result in immediately hiding the button |                     // Disabled animations would result in immediately hiding the button | ||||||
|                     // after it showed up |                     // after it showed up | ||||||
|                     if (DeviceUtils.hasAnimationsAnimatorDurationEnabled(context)) { |                     // Context can be null in some cases, so we have to make sure it is not null in | ||||||
|                         // Hide the new items-"popup" after 10s |                     // order to avoid a NullPointerException | ||||||
|                         hideNewItemsLoaded(true, 10000) |                     context?.let { | ||||||
|  |                         if (DeviceUtils.hasAnimationsAnimatorDurationEnabled(it)) { | ||||||
|  |                             // Hide the new items button after 10s | ||||||
|  |                             hideNewItemsLoaded(true, 10000) | ||||||
|  |                         } | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             ) |             ) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Stypox
					Stypox