mirror of
				https://github.com/SimpleMobileTools/Simple-Calculator.git
				synced 2025-06-05 21:49:13 +02:00 
			
		
		
		
	refactor: extract getFeatureLockedDialogState
This commit is contained in:
		| @@ -46,13 +46,7 @@ class SettingsActivity : AppCompatActivity() { | |||||||
|                 } |                 } | ||||||
|                 val isOrWasThankYouInstalled = onEventValue { context.isOrWasThankYouInstalled() } |                 val isOrWasThankYouInstalled = onEventValue { context.isOrWasThankYouInstalled() } | ||||||
|                 val displayLanguage = remember { Locale.getDefault().displayLanguage } |                 val displayLanguage = remember { Locale.getDefault().displayLanguage } | ||||||
|                 val featureLockedDialogState = rememberAlertDialogState().apply { |                 val featureLockedDialogState = getFeatureLockedDialogState() | ||||||
|                     DialogMember { |  | ||||||
|                         FeatureLockedAlertDialog(alertDialogState = this) { |  | ||||||
|  |  | ||||||
|                         } |  | ||||||
|                     } |  | ||||||
|                 } |  | ||||||
|                 SettingsScreen( |                 SettingsScreen( | ||||||
|                     displayLanguage = displayLanguage, |                     displayLanguage = displayLanguage, | ||||||
|                     goBack = ::finish, |                     goBack = ::finish, | ||||||
| @@ -86,6 +80,14 @@ class SettingsActivity : AppCompatActivity() { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @Composable | ||||||
|  |     private fun getFeatureLockedDialogState() = | ||||||
|  |         rememberAlertDialogState().apply { | ||||||
|  |             DialogMember { | ||||||
|  |                 FeatureLockedAlertDialog(alertDialogState = this, callback = {}) | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|     private fun handleCustomizeColorsClick() { |     private fun handleCustomizeColorsClick() { | ||||||
|         Intent(applicationContext, CustomizationActivity::class.java).apply { |         Intent(applicationContext, CustomizationActivity::class.java).apply { | ||||||
|             putExtra(APP_ICON_IDS, getAppIconIds()) |             putExtra(APP_ICON_IDS, getAppIconIds()) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user