Merge branch 'production' into merge-prod-into-main
This commit is contained in:
commit
e2eb8a60f9
10 changed files with 21 additions and 21 deletions
|
|
@ -44,8 +44,9 @@ class ActivityPlanModel {
|
||||||
_roles = roles,
|
_roles = roles,
|
||||||
_imageURL = imageURL;
|
_imageURL = imageURL;
|
||||||
|
|
||||||
String? get imageURL =>
|
Uri? get imageURL => _imageURL != null
|
||||||
_imageURL != null ? "${Environment.cmsApi}$_imageURL" : null;
|
? Uri.tryParse("${Environment.cmsApi}$_imageURL")
|
||||||
|
: null;
|
||||||
|
|
||||||
Map<String, ActivityRole> get roles {
|
Map<String, ActivityRole> get roles {
|
||||||
if (_roles != null) return _roles!;
|
if (_roles != null) return _roles!;
|
||||||
|
|
|
||||||
|
|
@ -204,8 +204,7 @@ class EditCourseController extends State<EditCourse> {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
)
|
)
|
||||||
: ImageByUrl(
|
: ImageByUrl(
|
||||||
imageUrl:
|
imageUrl: _room?.avatar,
|
||||||
_room?.avatar?.toString(),
|
|
||||||
width: 200.0,
|
width: 200.0,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(0.0),
|
BorderRadius.circular(0.0),
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import 'package:fluffychat/widgets/matrix.dart';
|
||||||
import 'package:fluffychat/widgets/mxc_image.dart';
|
import 'package:fluffychat/widgets/mxc_image.dart';
|
||||||
|
|
||||||
class ImageByUrl extends StatelessWidget {
|
class ImageByUrl extends StatelessWidget {
|
||||||
final String? imageUrl;
|
final Uri? imageUrl;
|
||||||
final double width;
|
final double width;
|
||||||
final BorderRadius borderRadius;
|
final BorderRadius borderRadius;
|
||||||
final Widget? replacement;
|
final Widget? replacement;
|
||||||
|
|
@ -41,19 +41,19 @@ class ImageByUrl extends StatelessWidget {
|
||||||
height: width,
|
height: width,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
child: imageUrl!.startsWith("mxc")
|
child: imageUrl!.toString().startsWith("mxc")
|
||||||
? MxcImage(
|
? MxcImage(
|
||||||
uri: Uri.parse(imageUrl!),
|
uri: imageUrl,
|
||||||
width: width,
|
width: width,
|
||||||
height: width,
|
height: width,
|
||||||
cacheKey: imageUrl,
|
cacheKey: imageUrl.toString(),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
)
|
)
|
||||||
: CachedNetworkImage(
|
: CachedNetworkImage(
|
||||||
width: width,
|
width: width,
|
||||||
height: width,
|
height: width,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
imageUrl: imageUrl!,
|
imageUrl: imageUrl.toString(),
|
||||||
placeholder: (
|
placeholder: (
|
||||||
context,
|
context,
|
||||||
url,
|
url,
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ class SelectedCourseController extends State<SelectedCourse>
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
avatarUrl: course.imageUrl,
|
avatarUrl: course.imageUrl.toString(),
|
||||||
spaceChild: 0,
|
spaceChild: 0,
|
||||||
)
|
)
|
||||||
.then((spaceId) => completer.complete(spaceId))
|
.then((spaceId) => completer.complete(spaceId))
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,8 @@ class SelectedCourseView extends StatelessWidget {
|
||||||
ClipPath(
|
ClipPath(
|
||||||
clipper: MapClipper(),
|
clipper: MapClipper(),
|
||||||
child: ImageByUrl(
|
child: ImageByUrl(
|
||||||
imageUrl: controller
|
imageUrl: controller.widget
|
||||||
.widget.roomChunk?.avatarUrl
|
.roomChunk?.avatarUrl ??
|
||||||
?.toString() ??
|
|
||||||
course.imageUrl,
|
course.imageUrl,
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
|
|
|
||||||
|
|
@ -79,9 +79,9 @@ class CourseTopicModel {
|
||||||
return allLocationMedia;
|
return allLocationMedia;
|
||||||
}
|
}
|
||||||
|
|
||||||
String? get imageUrl => loadedLocationMediaIds.isEmpty
|
Uri? get imageUrl => loadedLocationMediaIds.isEmpty
|
||||||
? null
|
? null
|
||||||
: "${Environment.cmsApi}${loadedLocationMediaIds.first}";
|
: Uri.tryParse("${Environment.cmsApi}${loadedLocationMediaIds.first}");
|
||||||
|
|
||||||
bool get activityListComplete =>
|
bool get activityListComplete =>
|
||||||
activityIds.length == loadedActivities.length;
|
activityIds.length == loadedActivities.length;
|
||||||
|
|
|
||||||
|
|
@ -127,9 +127,11 @@ class CoursePlanModel {
|
||||||
uuids: mediaIds,
|
uuids: mediaIds,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
String? get imageUrl => loadedMediaUrls.mediaUrls.isEmpty
|
Uri? get imageUrl => loadedMediaUrls.mediaUrls.isEmpty
|
||||||
? loadedTopics.values
|
? loadedTopics.values
|
||||||
.lastWhereOrNull((topic) => topic.imageUrl != null)
|
.lastWhereOrNull((topic) => topic.imageUrl != null)
|
||||||
?.imageUrl
|
?.imageUrl
|
||||||
: "${Environment.cmsApi}${loadedMediaUrls.mediaUrls.first.url}";
|
: Uri.tryParse(
|
||||||
|
"${Environment.cmsApi}${loadedMediaUrls.mediaUrls.first.url}",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -293,8 +293,7 @@ class PublicCoursesPageState extends State<PublicCoursesPage> {
|
||||||
spacing: 8.0,
|
spacing: 8.0,
|
||||||
children: [
|
children: [
|
||||||
ImageByUrl(
|
ImageByUrl(
|
||||||
imageUrl:
|
imageUrl: roomChunk.avatarUrl,
|
||||||
roomChunk.avatarUrl?.toString(),
|
|
||||||
width: 58.0,
|
width: 58.0,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(10.0),
|
BorderRadius.circular(10.0),
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ class Avatar extends StatelessWidget {
|
||||||
// #Pangea
|
// #Pangea
|
||||||
: !(mxContent.toString().startsWith('mxc://'))
|
: !(mxContent.toString().startsWith('mxc://'))
|
||||||
? ImageByUrl(
|
? ImageByUrl(
|
||||||
imageUrl: mxContent.toString(),
|
imageUrl: mxContent,
|
||||||
width: size,
|
width: size,
|
||||||
replacement: Center(
|
replacement: Center(
|
||||||
child: Icon(
|
child: Icon(
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ description: Learn a language while texting your friends.
|
||||||
# Pangea#
|
# Pangea#
|
||||||
publish_to: none
|
publish_to: none
|
||||||
# On version bump also increase the build number for F-Droid
|
# On version bump also increase the build number for F-Droid
|
||||||
version: 4.1.16+2
|
version: 4.1.16+3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.0.0 <4.0.0"
|
sdk: ">=3.0.0 <4.0.0"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue