-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
119: feat: fixed for the issue (#118) r=myConsciousness a=myConsciousness # 1. Description <!-- Provide a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change. If this is a breaking change, specify explicitly which APIs have been changed. --> ## 1.1. Checklist <!-- Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process. --> - [x] The title of my PR starts with a [Conventional Commit] prefix (`fix:`, `feat:`, `docs:` etc). - [x] I have read the [Contributor Guide] and followed the process outlined for submitting PRs. - [x] I have updated/added tests for ALL new/updated/fixed functionality. - [x] I have updated/added relevant documentation in `docs` and added dartdoc comments with `///`. - [x] I have updated/added relevant examples in `examples`. ## 1.2. Breaking Change <!-- Does your PR require users to manually update their apps to accommodate your change? If the PR is a breaking change this should be indicated with suffix "!" (for example, `feat!:`, `fix!:`). See [Conventional Commit] for details. --> - [ ] Yes, this is a breaking change. - [x] No, this is _not_ a breaking change. ## 1.3. Related Issues <!-- Provide a list of issues related to this PR from the [issue database]. Indicate which of these issues are resolved or fixed by this PR, i.e. Fixes #xxxx* !--> <!-- Links --> [issue database]: https://github.com/mastodon-dart/mastodon-api/issues [contributor guide]: https://github.com/mastodon-dart/mastodon-api/blob/main/CONTRIBUTING.md [style guide]: https://github.com/mastodon-dart/mastodon-api/blob/main/STYLEGUIDE.md [conventional commit]: https://conventionalcommits.org Co-authored-by: myConsciousness <contact@shinyakato.dev>
- Loading branch information
Showing
30 changed files
with
1,266 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// 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'; | ||
|
||
import 'account.dart'; | ||
import 'emoji.dart'; | ||
import 'media_attachment.dart'; | ||
import 'poll.dart'; | ||
|
||
part 'status_edit.freezed.dart'; | ||
part 'status_edit.g.dart'; | ||
|
||
/// Represents a revision of a status that has been edited. | ||
@freezed | ||
class StatusEdit with _$StatusEdit { | ||
@JsonSerializable(includeIfNull: false) | ||
const factory StatusEdit({ | ||
/// The content of the status at this revision. | ||
required String content, | ||
|
||
/// The content of the subject or content warning at this revision. | ||
required String spoilerText, | ||
|
||
/// The account that published this revision. | ||
required Account account, | ||
|
||
/// The current state of the poll options at this revision. | ||
/// | ||
/// Note that edits changing the poll options will be collapsed together | ||
/// into one edit, since this action resets the poll. | ||
Poll? poll, | ||
|
||
/// The current state of the poll options at this revision. | ||
/// | ||
/// Note that edits changing the poll options will be collapsed together | ||
/// into one edit, since this action resets the poll. | ||
required List<MediaAttachment> mediaAttachments, | ||
|
||
/// Any custom emoji that are used in the current revision. | ||
required List<Emoji> emojis, | ||
|
||
/// Whether the status was marked sensitive at this revision. | ||
@JsonKey(name: 'sensitive') required bool isSensitive, | ||
|
||
/// The timestamp of when the revision was published. | ||
required DateTime createdAt, | ||
}) = _StatusEdit; | ||
|
||
factory StatusEdit.fromJson(Map<String, Object?> json) => | ||
_$StatusEditFromJson(json); | ||
} |
Oops, something went wrong.