@@ -5,8 +5,6 @@ import android.content.Intent
55import android.util.Log
66import android.widget.Toast
77import androidx.compose.foundation.ExperimentalFoundationApi
8- import androidx.compose.foundation.Image
9- import androidx.compose.foundation.background
108import androidx.compose.foundation.combinedClickable
119import androidx.compose.foundation.layout.Arrangement
1210import androidx.compose.foundation.layout.Column
@@ -16,7 +14,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
1614import androidx.compose.foundation.layout.padding
1715import androidx.compose.foundation.layout.size
1816import androidx.compose.foundation.layout.width
19- import androidx.compose.foundation.shape.RoundedCornerShape
2017import androidx.compose.material3.Button
2118import androidx.compose.material3.Icon
2219import androidx.compose.material3.MaterialTheme
@@ -26,8 +23,6 @@ import androidx.compose.material3.Text
2623import androidx.compose.runtime.Composable
2724import androidx.compose.ui.Alignment
2825import androidx.compose.ui.Modifier
29- import androidx.compose.ui.draw.clip
30- import androidx.compose.ui.layout.ContentScale
3126import androidx.compose.ui.platform.LocalContext
3227import androidx.compose.ui.res.painterResource
3328import androidx.compose.ui.res.stringResource
@@ -41,7 +36,6 @@ import com.brittytino.patchwork.R
4136fun AboutSection (
4237 modifier : Modifier = Modifier ,
4338 appName : String = stringResource(R .string.app_name),
44- developerName : String = stringResource(R .string.app_developer_name),
4539 description : String = stringResource(R .string.app_description),
4640 onAvatarLongClick : () -> Unit = {}
4741) {
@@ -53,8 +47,7 @@ fun AboutSection(
5347 }
5448
5549 Surface (
56- modifier = modifier
57- .fillMaxWidth(),
50+ modifier = modifier.fillMaxWidth(),
5851 shape = MaterialTheme .shapes.medium,
5952 color = MaterialTheme .colorScheme.surfaceBright
6053 ) {
@@ -70,26 +63,14 @@ fun AboutSection(
7063 textAlign = TextAlign .Center
7164 )
7265
73- Image (
74- painter = painterResource(id = R .drawable.avatar),
75- contentDescription = " Developer Avatar" ,
76- contentScale = ContentScale .Crop ,
77- modifier = Modifier
78- .size(120 .dp)
79- .clip(RoundedCornerShape (16 .dp))
80- .background(MaterialTheme .colorScheme.primary)
81- .combinedClickable(
82- onClick = {},
83- onLongClick = {
84- onAvatarLongClick()
85- }
86- )
87- )
88-
8966 Text (
90- text = stringResource(R .string.developed_by_format, developerName ),
67+ text = stringResource(R .string.developed_by_format),
9168 style = MaterialTheme .typography.titleMedium,
92- textAlign = TextAlign .Center
69+ textAlign = TextAlign .Center ,
70+ modifier = Modifier .combinedClickable(
71+ onClick = {},
72+ onLongClick = onAvatarLongClick
73+ )
9374 )
9475
9576 FlowRow (
@@ -134,7 +115,6 @@ fun AboutSection(
134115
135116 OutlinedButton (
136117 onClick = {
137- // Use mailto: URI so the system opens an email client
138118 val mailUri = " mailto:mail@brittytino08@gmail.com" .toUri()
139119 val emailIntent = Intent (Intent .ACTION_SENDTO , mailUri).apply {
140120 putExtra(Intent .EXTRA_SUBJECT , " Hello from Essentials" )
@@ -179,123 +159,6 @@ fun AboutSection(
179159 Spacer (modifier = Modifier .width(8 .dp))
180160 Text (stringResource(R .string.action_telegram))
181161 }
182-
183- OutlinedButton (
184- onClick = {
185- val websiteUrl = " https://buymeacoffee.com/tinobritty"
186- val intent = Intent (Intent .ACTION_VIEW , websiteUrl.toUri())
187- context.startActivity(intent)
188- },
189- modifier = Modifier .padding(horizontal = 4 .dp)
190- ) {
191- Icon (
192- painter = painterResource(id = R .drawable.rounded_heart_smile_24),
193- contentDescription = null ,
194- modifier = Modifier .size(18 .dp)
195- )
196- Spacer (modifier = Modifier .width(8 .dp))
197- Text (stringResource(R .string.action_support))
198- }
199- }
200-
201- Text (
202- text = stringResource(R .string.label_other_apps),
203- style = MaterialTheme .typography.titleMedium,
204- textAlign = TextAlign .Center
205- )
206-
207- FlowRow (
208- modifier = Modifier .fillMaxWidth(),
209- horizontalArrangement = Arrangement .Center ,
210- verticalArrangement = Arrangement .spacedBy(6 .dp),
211- maxItemsInEachRow = 3
212- ) {
213-
214- OutlinedButton (
215- onClick = {
216- val websiteUrl =
217- " https://play.google.com/store/apps/details?id=com.brittytino.airsync&hl=en"
218- val intent = Intent (Intent .ACTION_VIEW , websiteUrl.toUri())
219- context.startActivity(intent)
220- },
221- modifier = Modifier .padding(horizontal = 4 .dp)
222- ) {
223- Icon (
224- painter = painterResource(id = R .drawable.rounded_devices_24),
225- contentDescription = null ,
226- modifier = Modifier .size(18 .dp)
227- )
228- Spacer (modifier = Modifier .width(8 .dp))
229- Text (stringResource(R .string.app_airsync))
230- }
231-
232- OutlinedButton (
233- onClick = {
234- val websiteUrl = " https://brittytino08@gmail.com/zen"
235- val intent = Intent (Intent .ACTION_VIEW , websiteUrl.toUri())
236- context.startActivity(intent)
237- },
238- modifier = Modifier .padding(horizontal = 4 .dp)
239- ) {
240- Icon (
241- painter = painterResource(id = R .drawable.rounded_web_24),
242- contentDescription = null ,
243- modifier = Modifier .size(18 .dp)
244- )
245- Spacer (modifier = Modifier .width(8 .dp))
246- Text (stringResource(R .string.app_zenzero))
247- }
248-
249- OutlinedButton (
250- onClick = {
251- val websiteUrl = " https://github.com/brittytino/canvas"
252- val intent = Intent (Intent .ACTION_VIEW , websiteUrl.toUri())
253- context.startActivity(intent)
254- },
255- modifier = Modifier .padding(horizontal = 4 .dp)
256- ) {
257- Icon (
258- painter = painterResource(id = R .drawable.rounded_draw_24),
259- contentDescription = null ,
260- modifier = Modifier .size(18 .dp)
261- )
262- Spacer (modifier = Modifier .width(8 .dp))
263- Text (stringResource(R .string.app_canvas))
264- }
265-
266- OutlinedButton (
267- onClick = {
268- val websiteUrl = " https://github.com/brittytino/tasks"
269- val intent = Intent (Intent .ACTION_VIEW , websiteUrl.toUri())
270- context.startActivity(intent)
271- },
272- modifier = Modifier .padding(horizontal = 4 .dp)
273- ) {
274- Icon (
275- painter = painterResource(id = R .drawable.rounded_task_alt_24),
276- contentDescription = null ,
277- modifier = Modifier .size(18 .dp)
278- )
279- Spacer (modifier = Modifier .width(8 .dp))
280- Text (stringResource(R .string.app_tasks))
281- }
282-
283- OutlinedButton (
284- onClick = {
285- val websiteUrl = " https://github.com/brittytino/Browser"
286- val intent = Intent (Intent .ACTION_VIEW , websiteUrl.toUri())
287- context.startActivity(intent)
288- },
289- modifier = Modifier .padding(horizontal = 4 .dp)
290- ) {
291- Icon (
292- painter = painterResource(id = R .drawable.outline_highlight_mouse_cursor_24),
293- contentDescription = null ,
294- modifier = Modifier .size(18 .dp)
295- )
296- Spacer (modifier = Modifier .width(8 .dp))
297- Text (stringResource(R .string.app_zero))
298- }
299162 }
300163 }
301164 }
0 commit comments