File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
app/src/main/java/org/thoughtcrime/securesms/preferences/prosettings Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -159,3 +159,51 @@ private fun PreviewBaseCellButton(
159
159
)
160
160
}
161
161
}
162
+
163
+ /* *
164
+ * A reusable structure for Pro Settings screens for non originating steps
165
+ */
166
+ @Composable
167
+ fun BaseNonOriginatingProSettingsScreen (
168
+ disabled : Boolean ,
169
+ onBack : () -> Unit ,
170
+ buttonText : String ,
171
+ dangerButton : Boolean ,
172
+ onButtonClick : () -> Unit ,
173
+ title : String? = null,
174
+ content : @Composable () -> Unit
175
+ ) {
176
+ BaseCellButtonProSettingsScreen (
177
+ disabled = disabled,
178
+ onBack = onBack,
179
+ buttonText = buttonText,
180
+ dangerButton = dangerButton,
181
+ onButtonClick = onButtonClick,
182
+ title = title,
183
+ content = content
184
+ )
185
+ }
186
+
187
+ @Preview
188
+ @Composable
189
+ private fun PreviewBaseNonOrig (
190
+ @PreviewParameter(SessionColorsParameterProvider ::class ) colors : ThemeColors
191
+ ) {
192
+ PreviewTheme (colors) {
193
+ BaseNonOriginatingProSettingsScreen (
194
+ disabled = false ,
195
+ onBack = {},
196
+ title = " This is a title" ,
197
+ buttonText = " This is a button" ,
198
+ dangerButton = true ,
199
+ onButtonClick = {},
200
+ content = {
201
+ Box (
202
+ modifier = Modifier .padding(LocalDimensions .current.smallSpacing)
203
+ ) {
204
+ Text (" This is a cell button content screen~" )
205
+ }
206
+ }
207
+ )
208
+ }
209
+ }
You can’t perform that action at this time.
0 commit comments