🐛 Bug fixes
🐛 Fix cannot scan QR code from share post via image
This commit is contained in:
parent
210c73a831
commit
a3a0e8c7a2
@ -439,6 +439,7 @@
|
||||
"userUnblocked": "{} has been unblocked.",
|
||||
"userBlocked": "{} has been blocked.",
|
||||
"postSharingViaPicture": "Capturing post as picture, please stand by...",
|
||||
"postImageShareReadMore": "Scan the QR code to read full post",
|
||||
"postImageShareAds": "Explore posts on the Solar Network",
|
||||
"postShare": "Share",
|
||||
"postShareImage": "Share via Image"
|
||||
|
@ -437,6 +437,7 @@
|
||||
"userUnblocked": "已解除屏蔽用户 {}",
|
||||
"userBlocked": "已屏蔽用户 {}",
|
||||
"postSharingViaPicture": "正在生成帖子截图,请稍等片刻……",
|
||||
"postImageShareReadMore": "扫描坐车 QRCode 查看全文",
|
||||
"postImageShareAds": "来 Solar Network 探索更多有趣帖子",
|
||||
"postShare": "分享",
|
||||
"postShareImage": "分享帖图"
|
||||
|
@ -437,6 +437,7 @@
|
||||
"userUnblocked": "已解除屏蔽用户 {}",
|
||||
"userBlocked": "已屏蔽用户 {}",
|
||||
"postSharingViaPicture": "正在生成帖子截圖,請稍等片刻……",
|
||||
"postImageShareReadMore": "掃描坐車 QRCode 查看全文",
|
||||
"postImageShareAds": "來 Solar Network 探索更多有趣帖子",
|
||||
"postShare": "分享",
|
||||
"postShareImage": "分享帖圖"
|
||||
|
@ -437,6 +437,7 @@
|
||||
"userUnblocked": "已解除遮蔽使用者 {}",
|
||||
"userBlocked": "已遮蔽使用者 {}",
|
||||
"postSharingViaPicture": "正在生成帖子截圖,請稍等片刻……",
|
||||
"postImageShareReadMore": "掃描坐車 QRCode 檢視全文",
|
||||
"postImageShareAds": "來 Solar Network 探索更多有趣帖子",
|
||||
"postShare": "分享",
|
||||
"postShareImage": "分享帖圖"
|
||||
|
@ -53,7 +53,7 @@ class SnPostContentProvider {
|
||||
if (out.body['thumbnail'] != null) {
|
||||
rids.add(out.body['thumbnail']);
|
||||
}
|
||||
if (out.repostId != null) {
|
||||
if (out.repostTo != null) {
|
||||
out = out.copyWith(
|
||||
repostTo: await _preloadRelatedDataSingle(out.repostTo!),
|
||||
);
|
||||
|
@ -84,7 +84,7 @@ class PostItem extends StatelessWidget {
|
||||
],
|
||||
child: ResponsiveBreakpoints.builder(
|
||||
breakpoints: ResponsiveBreakpoints.of(context).breakpoints,
|
||||
child: PostShareImage(data: data),
|
||||
child: PostShareImageWidget(data: data),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -115,7 +115,7 @@ class PostItem extends StatelessWidget {
|
||||
final sn = context.read<SnNetworkProvider>();
|
||||
|
||||
final ua = context.read<UserProvider>();
|
||||
final isAuthor = ua.isAuthorized && data.publisher.accountId == ua.user!.id;
|
||||
final isAuthor = ua.isAuthorized && data.publisher.accountId == ua.user?.id;
|
||||
|
||||
// Article headline preview
|
||||
if (!showFullPost && data.type == 'article') {
|
||||
@ -261,8 +261,8 @@ class PostItem extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class PostShareImage extends StatelessWidget {
|
||||
const PostShareImage({
|
||||
class PostShareImageWidget extends StatelessWidget {
|
||||
const PostShareImageWidget({
|
||||
super.key,
|
||||
required this.data,
|
||||
});
|
||||
@ -349,6 +349,11 @@ class PostShareImage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
if(data.body['content_truncated'] == true)
|
||||
Text(
|
||||
'postImageShareReadMore'.tr(),
|
||||
style: GoogleFonts.robotoMono(fontSize: 11),
|
||||
),
|
||||
Text(
|
||||
'postImageShareAds',
|
||||
style: GoogleFonts.robotoMono(fontSize: 13),
|
||||
@ -359,15 +364,16 @@ class PostShareImage extends StatelessWidget {
|
||||
QrImageView(
|
||||
padding: EdgeInsets.zero,
|
||||
data: 'https://solsynth.dev/posts/${data.id}',
|
||||
errorCorrectionLevel: QrErrorCorrectLevel.H,
|
||||
version: QrVersions.auto,
|
||||
size: 100,
|
||||
gapless: true,
|
||||
embeddedImage: AssetImage('assets/icon/icon-light-radius.png'),
|
||||
embeddedImageStyle: QrEmbeddedImageStyle(
|
||||
size: Size(32, 32),
|
||||
size: Size(24, 24),
|
||||
),
|
||||
eyeStyle: QrEyeStyle(
|
||||
eyeShape: QrEyeShape.circle,
|
||||
eyeShape: QrEyeShape.square,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
dataModuleStyle: QrDataModuleStyle(
|
||||
|
@ -10,12 +10,8 @@
|
||||
<true/>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.bluetooth</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.downloads.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
|
@ -8,12 +8,8 @@
|
||||
<true/>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.bluetooth</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.downloads.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
|
Loading…
Reference in New Issue
Block a user