This commit is contained in:
		@@ -7,6 +7,9 @@ class MediaItem {
 | 
				
			|||||||
  final int mode;
 | 
					  final int mode;
 | 
				
			||||||
  final List<Tag>? tags;
 | 
					  final List<Tag>? tags;
 | 
				
			||||||
  final List<Favorite>? favorites;
 | 
					  final List<Favorite>? favorites;
 | 
				
			||||||
 | 
					  final String? username;
 | 
				
			||||||
 | 
					  final String? userchannel;
 | 
				
			||||||
 | 
					  final String? usernetwork;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  MediaItem({
 | 
					  MediaItem({
 | 
				
			||||||
    required this.id,
 | 
					    required this.id,
 | 
				
			||||||
@@ -17,6 +20,9 @@ class MediaItem {
 | 
				
			|||||||
    required this.mode,
 | 
					    required this.mode,
 | 
				
			||||||
    this.tags = const [],
 | 
					    this.tags = const [],
 | 
				
			||||||
    this.favorites = const [],
 | 
					    this.favorites = const [],
 | 
				
			||||||
 | 
					    this.username,
 | 
				
			||||||
 | 
					    this.userchannel,
 | 
				
			||||||
 | 
					    this.usernetwork,
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  String get thumbnailUrl => 'https://f0ck.me/t/$id.webp';
 | 
					  String get thumbnailUrl => 'https://f0ck.me/t/$id.webp';
 | 
				
			||||||
@@ -33,6 +39,9 @@ class MediaItem {
 | 
				
			|||||||
    int? mode,
 | 
					    int? mode,
 | 
				
			||||||
    List<Tag>? tags,
 | 
					    List<Tag>? tags,
 | 
				
			||||||
    List<Favorite>? favorites,
 | 
					    List<Favorite>? favorites,
 | 
				
			||||||
 | 
					    String? username,
 | 
				
			||||||
 | 
					    String? userchannel,
 | 
				
			||||||
 | 
					    String? usernetwork,
 | 
				
			||||||
  }) {
 | 
					  }) {
 | 
				
			||||||
    return MediaItem(
 | 
					    return MediaItem(
 | 
				
			||||||
      id: id ?? this.id,
 | 
					      id: id ?? this.id,
 | 
				
			||||||
@@ -43,6 +52,9 @@ class MediaItem {
 | 
				
			|||||||
      mode: mode ?? this.mode,
 | 
					      mode: mode ?? this.mode,
 | 
				
			||||||
      tags: tags ?? this.tags,
 | 
					      tags: tags ?? this.tags,
 | 
				
			||||||
      favorites: favorites ?? this.favorites,
 | 
					      favorites: favorites ?? this.favorites,
 | 
				
			||||||
 | 
					      username: username ?? this.username,
 | 
				
			||||||
 | 
					      userchannel: userchannel ?? this.userchannel,
 | 
				
			||||||
 | 
					      usernetwork: usernetwork ?? this.usernetwork,
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -64,6 +76,9 @@ class MediaItem {
 | 
				
			|||||||
              ?.map((e) => Favorite.fromJson(e))
 | 
					              ?.map((e) => Favorite.fromJson(e))
 | 
				
			||||||
              .toList() ??
 | 
					              .toList() ??
 | 
				
			||||||
          [],
 | 
					          [],
 | 
				
			||||||
 | 
					      username: json['username'],
 | 
				
			||||||
 | 
					      userchannel: json['userchannel'],
 | 
				
			||||||
 | 
					      usernetwork: json['usernetwork'],
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -97,8 +112,8 @@ class Favorite {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  factory Favorite.fromJson(Map<String, dynamic> json) {
 | 
					  factory Favorite.fromJson(Map<String, dynamic> json) {
 | 
				
			||||||
    return Favorite(
 | 
					    return Favorite(
 | 
				
			||||||
      userId: json['user_id'],
 | 
					      userId: json['userId'],
 | 
				
			||||||
      username: json['user'],
 | 
					      username: json['username'],
 | 
				
			||||||
      avatar: json['avatar'],
 | 
					      avatar: json['avatar'],
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -305,64 +305,95 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> {
 | 
				
			|||||||
                  () => PullexRefreshController(),
 | 
					                  () => PullexRefreshController(),
 | 
				
			||||||
                );
 | 
					                );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return PullexRefresh(
 | 
					            return Stack(
 | 
				
			||||||
              onRefresh: () => _onRefresh(item.id, refreshController),
 | 
					              children: [
 | 
				
			||||||
              header: const WaterDropHeader(),
 | 
					                PullexRefresh(
 | 
				
			||||||
              controller: refreshController,
 | 
					                  onRefresh: () => _onRefresh(item.id, refreshController),
 | 
				
			||||||
              child: CustomScrollView(
 | 
					                  header: const WaterDropHeader(),
 | 
				
			||||||
                controller: scrollController,
 | 
					                  controller: refreshController,
 | 
				
			||||||
                slivers: [
 | 
					                  child: CustomScrollView(
 | 
				
			||||||
                  SliverToBoxAdapter(
 | 
					                    controller: scrollController,
 | 
				
			||||||
                    child: AnimatedBuilder(
 | 
					                    slivers: [
 | 
				
			||||||
                      animation: _pageController!,
 | 
					                      SliverToBoxAdapter(
 | 
				
			||||||
                      builder: (context, child) {
 | 
					                        child: AnimatedBuilder(
 | 
				
			||||||
                        return buildAnimatedTransition(
 | 
					                          animation: _pageController!,
 | 
				
			||||||
                          context: context,
 | 
					                          builder: (context, child) {
 | 
				
			||||||
                          pageController: _pageController!,
 | 
					                            return buildAnimatedTransition(
 | 
				
			||||||
                          index: index,
 | 
					                              context: context,
 | 
				
			||||||
                          child: child!,
 | 
					                              pageController: _pageController!,
 | 
				
			||||||
                        );
 | 
					                              index: index,
 | 
				
			||||||
                      },
 | 
					                              child: child!,
 | 
				
			||||||
                      child: Obx(
 | 
					                            );
 | 
				
			||||||
                        () => _buildMedia(item, index == _currentIndex.value),
 | 
					                          },
 | 
				
			||||||
                      ),
 | 
					                          child: Obx(
 | 
				
			||||||
                    ),
 | 
					                            () =>
 | 
				
			||||||
                  ),
 | 
					                                _buildMedia(item, index == _currentIndex.value),
 | 
				
			||||||
                  if (isReady)
 | 
					 | 
				
			||||||
                    SliverFillRemaining(
 | 
					 | 
				
			||||||
                      hasScrollBody: false,
 | 
					 | 
				
			||||||
                      fillOverscroll: true,
 | 
					 | 
				
			||||||
                      child: GestureDetector(
 | 
					 | 
				
			||||||
                        onTap: () => settingsController.hideVideoControls(),
 | 
					 | 
				
			||||||
                        behavior: HitTestBehavior.translucent,
 | 
					 | 
				
			||||||
                        child: Padding(
 | 
					 | 
				
			||||||
                          padding: const EdgeInsets.all(16.0),
 | 
					 | 
				
			||||||
                          child: Column(
 | 
					 | 
				
			||||||
                            crossAxisAlignment: CrossAxisAlignment.center,
 | 
					 | 
				
			||||||
                            children: [
 | 
					 | 
				
			||||||
                              TagSection(tags: item.tags ?? []),
 | 
					 | 
				
			||||||
                              Obx(
 | 
					 | 
				
			||||||
                                () => Visibility(
 | 
					 | 
				
			||||||
                                  visible: authController.isLoggedIn,
 | 
					 | 
				
			||||||
                                  child: Padding(
 | 
					 | 
				
			||||||
                                    padding: const EdgeInsets.only(top: 20.0),
 | 
					 | 
				
			||||||
                                    child: FavoriteSection(
 | 
					 | 
				
			||||||
                                      item: item,
 | 
					 | 
				
			||||||
                                      index: index,
 | 
					 | 
				
			||||||
                                    ),
 | 
					 | 
				
			||||||
                                  ),
 | 
					 | 
				
			||||||
                                ),
 | 
					 | 
				
			||||||
                              ),
 | 
					 | 
				
			||||||
                            ],
 | 
					 | 
				
			||||||
                          ),
 | 
					                          ),
 | 
				
			||||||
                        ),
 | 
					                        ),
 | 
				
			||||||
                      ),
 | 
					                      ),
 | 
				
			||||||
                    ),
 | 
					                      if (isReady)
 | 
				
			||||||
                  const SliverToBoxAdapter(
 | 
					                        SliverFillRemaining(
 | 
				
			||||||
                    child: SafeArea(child: SizedBox.shrink()),
 | 
					                          hasScrollBody: false,
 | 
				
			||||||
 | 
					                          fillOverscroll: true,
 | 
				
			||||||
 | 
					                          child: GestureDetector(
 | 
				
			||||||
 | 
					                            onTap: () => settingsController.hideVideoControls(),
 | 
				
			||||||
 | 
					                            behavior: HitTestBehavior.translucent,
 | 
				
			||||||
 | 
					                            child: Padding(
 | 
				
			||||||
 | 
					                              padding: const EdgeInsets.all(16.0),
 | 
				
			||||||
 | 
					                              child: Column(
 | 
				
			||||||
 | 
					                                crossAxisAlignment: CrossAxisAlignment.center,
 | 
				
			||||||
 | 
					                                children: [TagSection(tags: item.tags ?? [])],
 | 
				
			||||||
 | 
					                              ),
 | 
				
			||||||
 | 
					                            ),
 | 
				
			||||||
 | 
					                          ),
 | 
				
			||||||
 | 
					                        ),
 | 
				
			||||||
 | 
					                      const SliverToBoxAdapter(
 | 
				
			||||||
 | 
					                        child: SafeArea(child: SizedBox.shrink()),
 | 
				
			||||||
 | 
					                      ),
 | 
				
			||||||
 | 
					                    ],
 | 
				
			||||||
                  ),
 | 
					                  ),
 | 
				
			||||||
                ],
 | 
					                ),
 | 
				
			||||||
              ),
 | 
					                Obx(() {
 | 
				
			||||||
 | 
					                  if (!authController.isLoggedIn) {
 | 
				
			||||||
 | 
					                    return const SizedBox.shrink();
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                  final MediaItem currentItem =
 | 
				
			||||||
 | 
					                      mediaController.items[_currentIndex.value];
 | 
				
			||||||
 | 
					                  return DraggableScrollableSheet(
 | 
				
			||||||
 | 
					                    initialChildSize: 0.11,
 | 
				
			||||||
 | 
					                    minChildSize: 0.11,
 | 
				
			||||||
 | 
					                    maxChildSize: 0.245,
 | 
				
			||||||
 | 
					                    snap: true,
 | 
				
			||||||
 | 
					                    builder: (context, scrollController) => ListView(
 | 
				
			||||||
 | 
					                      controller: scrollController,
 | 
				
			||||||
 | 
					                      padding: const EdgeInsets.only(left: 16, right: 16),
 | 
				
			||||||
 | 
					                      children: [
 | 
				
			||||||
 | 
					                        FavoriteSection(
 | 
				
			||||||
 | 
					                          item: currentItem,
 | 
				
			||||||
 | 
					                          index: _currentIndex.value,
 | 
				
			||||||
 | 
					                        ),
 | 
				
			||||||
 | 
					                        const SizedBox(height: 16),
 | 
				
			||||||
 | 
					                        Text(
 | 
				
			||||||
 | 
					                          "Dateigröße: ${(currentItem.size / 1024).toStringAsFixed(1)} KB",
 | 
				
			||||||
 | 
					                          style: Theme.of(context).textTheme.bodySmall,
 | 
				
			||||||
 | 
					                        ),
 | 
				
			||||||
 | 
					                        Text(
 | 
				
			||||||
 | 
					                          "Typ: ${currentItem.mime}",
 | 
				
			||||||
 | 
					                          style: Theme.of(context).textTheme.bodySmall,
 | 
				
			||||||
 | 
					                        ),
 | 
				
			||||||
 | 
					                        Text(
 | 
				
			||||||
 | 
					                          "ID: ${currentItem.id}",
 | 
				
			||||||
 | 
					                          style: Theme.of(context).textTheme.bodySmall,
 | 
				
			||||||
 | 
					                        ),
 | 
				
			||||||
 | 
					                        Text(
 | 
				
			||||||
 | 
					                          "Hochgeladen am: ${DateTime.fromMillisecondsSinceEpoch(currentItem.stamp * 1000)}",
 | 
				
			||||||
 | 
					                          style: Theme.of(context).textTheme.bodySmall,
 | 
				
			||||||
 | 
					                        ),
 | 
				
			||||||
 | 
					                      ],
 | 
				
			||||||
 | 
					                    ),
 | 
				
			||||||
 | 
					                  );
 | 
				
			||||||
 | 
					                }),
 | 
				
			||||||
 | 
					              ],
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,7 +31,7 @@ class ApiService extends GetConnect {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    final Response<dynamic> response = await get(
 | 
					    final Response<dynamic> response = await get(
 | 
				
			||||||
      'https://api.f0ck.me/items_new/get',
 | 
					      'https://api.f0ck.me/items/get',
 | 
				
			||||||
      query: params,
 | 
					      query: params,
 | 
				
			||||||
      headers: headers,
 | 
					      headers: headers,
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 | 
				
			|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 | 
					# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 | 
				
			||||||
# In Windows, build-name is used as the major, minor, and patch parts
 | 
					# In Windows, build-name is used as the major, minor, and patch parts
 | 
				
			||||||
# of the product and file versions while build-number is used as the build suffix.
 | 
					# of the product and file versions while build-number is used as the build suffix.
 | 
				
			||||||
version: 1.4.5+66
 | 
					version: 1.4.6+67
 | 
				
			||||||
 | 
					
 | 
				
			||||||
environment:
 | 
					environment:
 | 
				
			||||||
  sdk: ^3.9.0-100.2.beta
 | 
					  sdk: ^3.9.0-100.2.beta
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user