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