Skip to content

Commit

Permalink
Merge branch 'main' into cron_upgrade_dart_dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
myConsciousness committed Feb 2, 2023
2 parents a858190 + 01a1e97 commit 69fc6d8
Show file tree
Hide file tree
Showing 11 changed files with 2,019 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@
"question",
"bug"
]
},
{
"login": "Kraigo",
"name": "Igor",
"avatar_url": "https://avatars.githubusercontent.com/u/8700639?v=4",
"profile": "https://github.com/Kraigo",
"contributions": [
"code",
"test"
]
}
],
"contributorsPerLine": 5,
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,14 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<table>
<tbody>
<tr>
<td align="center"><a href="https://github.com/myConsciousness"><img src="https://avatars.githubusercontent.com/u/13072231?v=4?s=100" width="100px;" alt="KATO, Shinya / 加藤 真也"/><br /><sub><b>KATO, Shinya / 加藤 真也</b></sub></a><br /><a href="https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness" title="Code">💻</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness" title="Documentation">📖</a> <a href="#design-myConsciousness" title="Design">🎨</a> <a href="#example-myConsciousness" title="Examples">💡</a> <a href="#fundingFinding-myConsciousness" title="Funding Finding">🔍</a> <a href="#ideas-myConsciousness" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-myConsciousness" title="Maintenance">🚧</a> <a href="#security-myConsciousness" title="Security">🛡️</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness" title="Tests">⚠️</a> <a href="#tutorial-myConsciousness" title="Tutorials">✅</a></td>
<td align="center"><a href="https://github.com/MarkOSullivan94"><img src="https://avatars.githubusercontent.com/u/6950843?v=4?s=100" width="100px;" alt="Mark O'Sullivan"/><br /><sub><b>Mark O'Sullivan</b></sub></a><br /><a href="https://github.com/mastodon-dart/mastodon-api/commits?author=MarkOSullivan94" title="Documentation">📖</a> <a href="#ideas-MarkOSullivan94" title="Ideas, Planning, & Feedback">🤔</a> <a href="#question-MarkOSullivan94" title="Answering Questions">💬</a></td>
<td align="center"><a href="https://github.com/Elleo"><img src="https://avatars.githubusercontent.com/u/59350?v=4?s=100" width="100px;" alt="Mike Sheldon"/><br /><sub><b>Mike Sheldon</b></sub></a><br /><a href="#ideas-Elleo" title="Ideas, Planning, & Feedback">🤔</a> <a href="#content-Elleo" title="Content">🖋</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=Elleo" title="Code">💻</a> <a href="https://github.com/mastodon-dart/mastodon-api/issues?q=author%3AElleo" title="Bug reports">🐛</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=Elleo" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/SkywaveTM"><img src="https://avatars.githubusercontent.com/u/4926340?v=4?s=100" width="100px;" alt="YeongJun"/><br /><sub><b>YeongJun</b></sub></a><br /><a href="#ideas-SkywaveTM" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=SkywaveTM" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/alevinetx"><img src="https://avatars.githubusercontent.com/u/5067356?v=4?s=100" width="100px;" alt="alevinetx"/><br /><sub><b>alevinetx</b></sub></a><br /><a href="https://github.com/mastodon-dart/mastodon-api/commits?author=alevinetx" title="Code">💻</a> <a href="#question-alevinetx" title="Answering Questions">💬</a> <a href="https://github.com/mastodon-dart/mastodon-api/issues?q=author%3Aalevinetx" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/myConsciousness"><img src="https://avatars.githubusercontent.com/u/13072231?v=4?s=100" width="100px;" alt="KATO, Shinya / 加藤 真也"/><br /><sub><b>KATO, Shinya / 加藤 真也</b></sub></a><br /><a href="https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness" title="Code">💻</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness" title="Documentation">📖</a> <a href="#design-myConsciousness" title="Design">🎨</a> <a href="#example-myConsciousness" title="Examples">💡</a> <a href="#fundingFinding-myConsciousness" title="Funding Finding">🔍</a> <a href="#ideas-myConsciousness" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-myConsciousness" title="Maintenance">🚧</a> <a href="#security-myConsciousness" title="Security">🛡️</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness" title="Tests">⚠️</a> <a href="#tutorial-myConsciousness" title="Tutorials">✅</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/MarkOSullivan94"><img src="https://avatars.githubusercontent.com/u/6950843?v=4?s=100" width="100px;" alt="Mark O'Sullivan"/><br /><sub><b>Mark O'Sullivan</b></sub></a><br /><a href="https://github.com/mastodon-dart/mastodon-api/commits?author=MarkOSullivan94" title="Documentation">📖</a> <a href="#ideas-MarkOSullivan94" title="Ideas, Planning, & Feedback">🤔</a> <a href="#question-MarkOSullivan94" title="Answering Questions">💬</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/Elleo"><img src="https://avatars.githubusercontent.com/u/59350?v=4?s=100" width="100px;" alt="Mike Sheldon"/><br /><sub><b>Mike Sheldon</b></sub></a><br /><a href="#ideas-Elleo" title="Ideas, Planning, & Feedback">🤔</a> <a href="#content-Elleo" title="Content">🖋</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=Elleo" title="Code">💻</a> <a href="https://github.com/mastodon-dart/mastodon-api/issues?q=author%3AElleo" title="Bug reports">🐛</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=Elleo" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/SkywaveTM"><img src="https://avatars.githubusercontent.com/u/4926340?v=4?s=100" width="100px;" alt="YeongJun"/><br /><sub><b>YeongJun</b></sub></a><br /><a href="#ideas-SkywaveTM" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=SkywaveTM" title="Code">💻</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/alevinetx"><img src="https://avatars.githubusercontent.com/u/5067356?v=4?s=100" width="100px;" alt="alevinetx"/><br /><sub><b>alevinetx</b></sub></a><br /><a href="https://github.com/mastodon-dart/mastodon-api/commits?author=alevinetx" title="Code">💻</a> <a href="#question-alevinetx" title="Answering Questions">💬</a> <a href="https://github.com/mastodon-dart/mastodon-api/issues?q=author%3Aalevinetx" title="Bug reports">🐛</a></td>
</tr>
<tr>
<td align="center" valign="top" width="20%"><a href="https://github.com/Kraigo"><img src="https://avatars.githubusercontent.com/u/8700639?v=4?s=100" width="100px;" alt="Igor"/><br /><sub><b>Igor</b></sub></a><br /><a href="https://github.com/mastodon-dart/mastodon-api/commits?author=Kraigo" title="Code">💻</a> <a href="https://github.com/mastodon-dart/mastodon-api/commits?author=Kraigo" title="Tests">⚠️</a></td>
</tr>
</tbody>
</table>
Expand Down
29 changes: 29 additions & 0 deletions lib/src/service/entities/status_context.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2023 Kato Shinya. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// ignore_for_file: invalid_annotation_target

// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

// 🌎 Project imports:
import '../../../mastodon_api.dart';

part 'status_context.freezed.dart';
part 'status_context.g.dart';

@freezed
class StatusContext with _$StatusContext {
@JsonSerializable(includeIfNull: false)
const factory StatusContext({
/// Parents in the thread.
required List<Status> ancestors,

/// Children in the thread.
required List<Status> descendants,
}) = _StatusesContext;

factory StatusContext.fromJson(Map<String, Object?> json) =>
_$StatusContextFromJson(json);
}
203 changes: 203 additions & 0 deletions lib/src/service/entities/status_context.freezed.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of 'status_context.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');

StatusContext _$StatusContextFromJson(Map<String, dynamic> json) {
return _StatusesContext.fromJson(json);
}

/// @nodoc
mixin _$StatusContext {
/// Parents in the thread.
List<Status> get ancestors => throw _privateConstructorUsedError;

/// Children in the thread.
List<Status> get descendants => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$StatusContextCopyWith<StatusContext> get copyWith =>
throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $StatusContextCopyWith<$Res> {
factory $StatusContextCopyWith(
StatusContext value, $Res Function(StatusContext) then) =
_$StatusContextCopyWithImpl<$Res, StatusContext>;
@useResult
$Res call({List<Status> ancestors, List<Status> descendants});
}

/// @nodoc
class _$StatusContextCopyWithImpl<$Res, $Val extends StatusContext>
implements $StatusContextCopyWith<$Res> {
_$StatusContextCopyWithImpl(this._value, this._then);

// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
@override
$Res call({
Object? ancestors = null,
Object? descendants = null,
}) {
return _then(_value.copyWith(
ancestors: null == ancestors
? _value.ancestors
: ancestors // ignore: cast_nullable_to_non_nullable
as List<Status>,
descendants: null == descendants
? _value.descendants
: descendants // ignore: cast_nullable_to_non_nullable
as List<Status>,
) as $Val);
}
}

/// @nodoc
abstract class _$$_StatusesContextCopyWith<$Res>
implements $StatusContextCopyWith<$Res> {
factory _$$_StatusesContextCopyWith(
_$_StatusesContext value, $Res Function(_$_StatusesContext) then) =
__$$_StatusesContextCopyWithImpl<$Res>;
@override
@useResult
$Res call({List<Status> ancestors, List<Status> descendants});
}

/// @nodoc
class __$$_StatusesContextCopyWithImpl<$Res>
extends _$StatusContextCopyWithImpl<$Res, _$_StatusesContext>
implements _$$_StatusesContextCopyWith<$Res> {
__$$_StatusesContextCopyWithImpl(
_$_StatusesContext _value, $Res Function(_$_StatusesContext) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
@override
$Res call({
Object? ancestors = null,
Object? descendants = null,
}) {
return _then(_$_StatusesContext(
ancestors: null == ancestors
? _value._ancestors
: ancestors // ignore: cast_nullable_to_non_nullable
as List<Status>,
descendants: null == descendants
? _value._descendants
: descendants // ignore: cast_nullable_to_non_nullable
as List<Status>,
));
}
}

/// @nodoc
@JsonSerializable(includeIfNull: false)
class _$_StatusesContext implements _StatusesContext {
const _$_StatusesContext(
{required final List<Status> ancestors,
required final List<Status> descendants})
: _ancestors = ancestors,
_descendants = descendants;

factory _$_StatusesContext.fromJson(Map<String, dynamic> json) =>
_$$_StatusesContextFromJson(json);

/// Parents in the thread.
final List<Status> _ancestors;

/// Parents in the thread.
@override
List<Status> get ancestors {
if (_ancestors is EqualUnmodifiableListView) return _ancestors;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_ancestors);
}

/// Children in the thread.
final List<Status> _descendants;

/// Children in the thread.
@override
List<Status> get descendants {
if (_descendants is EqualUnmodifiableListView) return _descendants;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_descendants);
}

@override
String toString() {
return 'StatusContext(ancestors: $ancestors, descendants: $descendants)';
}

@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_StatusesContext &&
const DeepCollectionEquality()
.equals(other._ancestors, _ancestors) &&
const DeepCollectionEquality()
.equals(other._descendants, _descendants));
}

@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_ancestors),
const DeepCollectionEquality().hash(_descendants));

@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_StatusesContextCopyWith<_$_StatusesContext> get copyWith =>
__$$_StatusesContextCopyWithImpl<_$_StatusesContext>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$_StatusesContextToJson(
this,
);
}
}

abstract class _StatusesContext implements StatusContext {
const factory _StatusesContext(
{required final List<Status> ancestors,
required final List<Status> descendants}) = _$_StatusesContext;

factory _StatusesContext.fromJson(Map<String, dynamic> json) =
_$_StatusesContext.fromJson;

@override

/// Parents in the thread.
List<Status> get ancestors;
@override

/// Children in the thread.
List<Status> get descendants;
@override
@JsonKey(ignore: true)
_$$_StatusesContextCopyWith<_$_StatusesContext> get copyWith =>
throw _privateConstructorUsedError;
}
37 changes: 37 additions & 0 deletions lib/src/service/entities/status_context.g.dart

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

Loading

0 comments on commit 69fc6d8

Please sign in to comment.