mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-03-03 12:16:47 +00:00
fix #387
This commit is contained in:
parent
318bb72b64
commit
7ac10d8326
4 changed files with 14 additions and 4 deletions
|
|
@ -65,6 +65,11 @@ class MainCameraController {
|
|||
setState();
|
||||
}
|
||||
|
||||
void onImageSend() {
|
||||
scannedUrl = '';
|
||||
setState();
|
||||
}
|
||||
|
||||
final BarcodeScanner _barcodeScanner = BarcodeScanner();
|
||||
final FaceDetector _faceDetector = FaceDetector(
|
||||
options: FaceDetectorOptions(
|
||||
|
|
|
|||
|
|
@ -424,6 +424,7 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
|||
),
|
||||
) as bool?;
|
||||
if (wasSend != null && wasSend && mounted) {
|
||||
widget.mainCameraController?.onImageSend();
|
||||
Navigator.pop(context, true);
|
||||
} else {
|
||||
await videoController?.play();
|
||||
|
|
@ -591,6 +592,8 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
|||
|
||||
if (!context.mounted) return;
|
||||
|
||||
widget.mainCameraController?.onImageSend();
|
||||
|
||||
// must be awaited so the widget for the screenshot is not already disposed when sending..
|
||||
await storeImageAsOriginal();
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@ class MastodonPostCard extends StatelessWidget {
|
|||
const SizedBox(height: 4),
|
||||
if (info.desc != null && info.desc != 'null')
|
||||
Text(
|
||||
substringBy(info.desc!, 1000),
|
||||
substringBy(
|
||||
info.desc!.replaceAll('Attached: 1 image', '').trim(),
|
||||
info.image == null ? 500 : 300),
|
||||
style: const TextStyle(color: Colors.white, fontSize: 14),
|
||||
),
|
||||
if (info.image != null && info.image != 'null')
|
||||
|
|
@ -57,7 +59,7 @@ class MastodonPostCard extends StatelessWidget {
|
|||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxHeight: 250),
|
||||
constraints: const BoxConstraints(maxHeight: 200),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: info.image!,
|
||||
fit: BoxFit.contain,
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class TwitterPostCard extends StatelessWidget {
|
|||
const SizedBox(height: 8),
|
||||
if (info.desc != null && info.desc != 'null')
|
||||
Text(
|
||||
substringBy(info.desc!, 1000),
|
||||
substringBy(info.desc!, info.image == null ? 500 : 300),
|
||||
style: const TextStyle(
|
||||
color: primaryText,
|
||||
fontSize: 15,
|
||||
|
|
@ -73,7 +73,7 @@ class TwitterPostCard extends StatelessWidget {
|
|||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxHeight: 300),
|
||||
constraints: const BoxConstraints(maxHeight: 200),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: info.image!,
|
||||
fit: BoxFit.cover,
|
||||
|
|
|
|||
Loading…
Reference in a new issue