Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Removing the site creator #39

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/src/v3/models/source.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class Site with _$Site {
required String name,
String? sidebar,
String? description,
required int creatorId,
required DateTime published,
DateTime? updated,
required bool enableDownvotes,
Expand Down
25 changes: 1 addition & 24 deletions lib/src/v3/models/source.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,6 @@ class _$SiteTearOff {
required String name,
String? sidebar,
String? description,
required int creatorId,
required DateTime published,
DateTime? updated,
required bool enableDownvotes,
Expand All @@ -1179,7 +1178,6 @@ class _$SiteTearOff {
name: name,
sidebar: sidebar,
description: description,
creatorId: creatorId,
published: published,
updated: updated,
enableDownvotes: enableDownvotes,
Expand Down Expand Up @@ -1210,7 +1208,6 @@ mixin _$Site {
String get name => throw _privateConstructorUsedError;
String? get sidebar => throw _privateConstructorUsedError;
String? get description => throw _privateConstructorUsedError;
int get creatorId => throw _privateConstructorUsedError;
DateTime get published => throw _privateConstructorUsedError;
DateTime? get updated => throw _privateConstructorUsedError;
bool get enableDownvotes => throw _privateConstructorUsedError;
Expand Down Expand Up @@ -1239,7 +1236,6 @@ abstract class $SiteCopyWith<$Res> {
String name,
String? sidebar,
String? description,
int creatorId,
DateTime published,
DateTime? updated,
bool enableDownvotes,
Expand Down Expand Up @@ -1269,7 +1265,6 @@ class _$SiteCopyWithImpl<$Res> implements $SiteCopyWith<$Res> {
Object? name = freezed,
Object? sidebar = freezed,
Object? description = freezed,
Object? creatorId = freezed,
Object? published = freezed,
Object? updated = freezed,
Object? enableDownvotes = freezed,
Expand Down Expand Up @@ -1301,10 +1296,6 @@ class _$SiteCopyWithImpl<$Res> implements $SiteCopyWith<$Res> {
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
creatorId: creatorId == freezed
? _value.creatorId
: creatorId // ignore: cast_nullable_to_non_nullable
as int,
published: published == freezed
? _value.published
: published // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -1371,7 +1362,6 @@ abstract class _$SiteCopyWith<$Res> implements $SiteCopyWith<$Res> {
String name,
String? sidebar,
String? description,
int creatorId,
DateTime published,
DateTime? updated,
bool enableDownvotes,
Expand Down Expand Up @@ -1402,7 +1392,6 @@ class __$SiteCopyWithImpl<$Res> extends _$SiteCopyWithImpl<$Res>
Object? name = freezed,
Object? sidebar = freezed,
Object? description = freezed,
Object? creatorId = freezed,
Object? published = freezed,
Object? updated = freezed,
Object? enableDownvotes = freezed,
Expand Down Expand Up @@ -1434,10 +1423,6 @@ class __$SiteCopyWithImpl<$Res> extends _$SiteCopyWithImpl<$Res>
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
creatorId: creatorId == freezed
? _value.creatorId
: creatorId // ignore: cast_nullable_to_non_nullable
as int,
published: published == freezed
? _value.published
: published // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -1505,7 +1490,6 @@ class _$_Site extends _Site {
required this.name,
this.sidebar,
this.description,
required this.creatorId,
required this.published,
this.updated,
required this.enableDownvotes,
Expand All @@ -1532,8 +1516,6 @@ class _$_Site extends _Site {
@override
final String? description;
@override
final int creatorId;
@override
final DateTime published;
@override
final DateTime? updated;
Expand Down Expand Up @@ -1562,7 +1544,7 @@ class _$_Site extends _Site {

@override
String toString() {
return 'Site(id: $id, name: $name, sidebar: $sidebar, description: $description, creatorId: $creatorId, published: $published, updated: $updated, enableDownvotes: $enableDownvotes, openRegistration: $openRegistration, enableNsfw: $enableNsfw, communityCreationAdminOnly: $communityCreationAdminOnly, icon: $icon, banner: $banner, requireEmailVerification: $requireEmailVerification, requireApplication: $requireApplication, applicationQuestion: $applicationQuestion, privateInstance: $privateInstance, instanceHost: $instanceHost)';
return 'Site(id: $id, name: $name, sidebar: $sidebar, description: $description, published: $published, updated: $updated, enableDownvotes: $enableDownvotes, openRegistration: $openRegistration, enableNsfw: $enableNsfw, communityCreationAdminOnly: $communityCreationAdminOnly, icon: $icon, banner: $banner, requireEmailVerification: $requireEmailVerification, requireApplication: $requireApplication, applicationQuestion: $applicationQuestion, privateInstance: $privateInstance, instanceHost: $instanceHost)';
}

@override
Expand All @@ -1575,7 +1557,6 @@ class _$_Site extends _Site {
const DeepCollectionEquality().equals(other.sidebar, sidebar) &&
const DeepCollectionEquality()
.equals(other.description, description) &&
const DeepCollectionEquality().equals(other.creatorId, creatorId) &&
const DeepCollectionEquality().equals(other.published, published) &&
const DeepCollectionEquality().equals(other.updated, updated) &&
const DeepCollectionEquality()
Expand Down Expand Up @@ -1607,7 +1588,6 @@ class _$_Site extends _Site {
const DeepCollectionEquality().hash(name),
const DeepCollectionEquality().hash(sidebar),
const DeepCollectionEquality().hash(description),
const DeepCollectionEquality().hash(creatorId),
const DeepCollectionEquality().hash(published),
const DeepCollectionEquality().hash(updated),
const DeepCollectionEquality().hash(enableDownvotes),
Expand Down Expand Up @@ -1639,7 +1619,6 @@ abstract class _Site extends Site {
required String name,
String? sidebar,
String? description,
required int creatorId,
required DateTime published,
DateTime? updated,
required bool enableDownvotes,
Expand All @@ -1666,8 +1645,6 @@ abstract class _Site extends Site {
@override
String? get description;
@override
int get creatorId;
@override
DateTime get published;
@override
DateTime? get updated;
Expand Down
2 changes: 0 additions & 2 deletions lib/src/v3/models/source.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/src/v3/models/views.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class SiteView with _$SiteView {
@JsonSerializable(fieldRename: FieldRename.snake)
const factory SiteView({
required Site site,
required PersonSafe creator,
required SiteAggregates counts,
required String instanceHost,
}) = _SiteView;
Expand Down
49 changes: 4 additions & 45 deletions lib/src/v3/models/views.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1016,12 +1016,10 @@ class _$SiteViewTearOff {

_SiteView call(
{required Site site,
required PersonSafe creator,
required SiteAggregates counts,
required String instanceHost}) {
return _SiteView(
site: site,
creator: creator,
counts: counts,
instanceHost: instanceHost,
);
Expand All @@ -1038,7 +1036,6 @@ const $SiteView = _$SiteViewTearOff();
/// @nodoc
mixin _$SiteView {
Site get site => throw _privateConstructorUsedError;
PersonSafe get creator => throw _privateConstructorUsedError;
SiteAggregates get counts => throw _privateConstructorUsedError;
String get instanceHost => throw _privateConstructorUsedError;

Expand All @@ -1052,14 +1049,9 @@ mixin _$SiteView {
abstract class $SiteViewCopyWith<$Res> {
factory $SiteViewCopyWith(SiteView value, $Res Function(SiteView) then) =
_$SiteViewCopyWithImpl<$Res>;
$Res call(
{Site site,
PersonSafe creator,
SiteAggregates counts,
String instanceHost});
$Res call({Site site, SiteAggregates counts, String instanceHost});

$SiteCopyWith<$Res> get site;
$PersonSafeCopyWith<$Res> get creator;
$SiteAggregatesCopyWith<$Res> get counts;
}

Expand All @@ -1074,7 +1066,6 @@ class _$SiteViewCopyWithImpl<$Res> implements $SiteViewCopyWith<$Res> {
@override
$Res call({
Object? site = freezed,
Object? creator = freezed,
Object? counts = freezed,
Object? instanceHost = freezed,
}) {
Expand All @@ -1083,10 +1074,6 @@ class _$SiteViewCopyWithImpl<$Res> implements $SiteViewCopyWith<$Res> {
? _value.site
: site // ignore: cast_nullable_to_non_nullable
as Site,
creator: creator == freezed
? _value.creator
: creator // ignore: cast_nullable_to_non_nullable
as PersonSafe,
counts: counts == freezed
? _value.counts
: counts // ignore: cast_nullable_to_non_nullable
Expand All @@ -1105,13 +1092,6 @@ class _$SiteViewCopyWithImpl<$Res> implements $SiteViewCopyWith<$Res> {
});
}

@override
$PersonSafeCopyWith<$Res> get creator {
return $PersonSafeCopyWith<$Res>(_value.creator, (value) {
return _then(_value.copyWith(creator: value));
});
}

@override
$SiteAggregatesCopyWith<$Res> get counts {
return $SiteAggregatesCopyWith<$Res>(_value.counts, (value) {
Expand All @@ -1125,17 +1105,11 @@ abstract class _$SiteViewCopyWith<$Res> implements $SiteViewCopyWith<$Res> {
factory _$SiteViewCopyWith(_SiteView value, $Res Function(_SiteView) then) =
__$SiteViewCopyWithImpl<$Res>;
@override
$Res call(
{Site site,
PersonSafe creator,
SiteAggregates counts,
String instanceHost});
$Res call({Site site, SiteAggregates counts, String instanceHost});

@override
$SiteCopyWith<$Res> get site;
@override
$PersonSafeCopyWith<$Res> get creator;
@override
$SiteAggregatesCopyWith<$Res> get counts;
}

Expand All @@ -1151,7 +1125,6 @@ class __$SiteViewCopyWithImpl<$Res> extends _$SiteViewCopyWithImpl<$Res>
@override
$Res call({
Object? site = freezed,
Object? creator = freezed,
Object? counts = freezed,
Object? instanceHost = freezed,
}) {
Expand All @@ -1160,10 +1133,6 @@ class __$SiteViewCopyWithImpl<$Res> extends _$SiteViewCopyWithImpl<$Res>
? _value.site
: site // ignore: cast_nullable_to_non_nullable
as Site,
creator: creator == freezed
? _value.creator
: creator // ignore: cast_nullable_to_non_nullable
as PersonSafe,
counts: counts == freezed
? _value.counts
: counts // ignore: cast_nullable_to_non_nullable
Expand All @@ -1181,10 +1150,7 @@ class __$SiteViewCopyWithImpl<$Res> extends _$SiteViewCopyWithImpl<$Res>
@JsonSerializable(fieldRename: FieldRename.snake)
class _$_SiteView extends _SiteView {
const _$_SiteView(
{required this.site,
required this.creator,
required this.counts,
required this.instanceHost})
{required this.site, required this.counts, required this.instanceHost})
: super._();

factory _$_SiteView.fromJson(Map<String, dynamic> json) =>
Expand All @@ -1193,15 +1159,13 @@ class _$_SiteView extends _SiteView {
@override
final Site site;
@override
final PersonSafe creator;
@override
final SiteAggregates counts;
@override
final String instanceHost;

@override
String toString() {
return 'SiteView(site: $site, creator: $creator, counts: $counts, instanceHost: $instanceHost)';
return 'SiteView(site: $site, counts: $counts, instanceHost: $instanceHost)';
}

@override
Expand All @@ -1210,7 +1174,6 @@ class _$_SiteView extends _SiteView {
(other.runtimeType == runtimeType &&
other is _SiteView &&
const DeepCollectionEquality().equals(other.site, site) &&
const DeepCollectionEquality().equals(other.creator, creator) &&
const DeepCollectionEquality().equals(other.counts, counts) &&
const DeepCollectionEquality()
.equals(other.instanceHost, instanceHost));
Expand All @@ -1220,7 +1183,6 @@ class _$_SiteView extends _SiteView {
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(site),
const DeepCollectionEquality().hash(creator),
const DeepCollectionEquality().hash(counts),
const DeepCollectionEquality().hash(instanceHost));

Expand All @@ -1238,7 +1200,6 @@ class _$_SiteView extends _SiteView {
abstract class _SiteView extends SiteView {
const factory _SiteView(
{required Site site,
required PersonSafe creator,
required SiteAggregates counts,
required String instanceHost}) = _$_SiteView;
const _SiteView._() : super._();
Expand All @@ -1248,8 +1209,6 @@ abstract class _SiteView extends SiteView {
@override
Site get site;
@override
PersonSafe get creator;
@override
SiteAggregates get counts;
@override
String get instanceHost;
Expand Down
2 changes: 0 additions & 2 deletions lib/src/v3/models/views.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.