Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove displayName #34

Merged
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
11 changes: 5 additions & 6 deletions lib/src/enums/note_visibility.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import 'package:freezed_annotation/freezed_annotation.dart';

enum NoteVisibility {
public("パブリック", 0),
home("ホームのみ", 1),
followers("フォロワーのみ", 2),
specified("ダイレクト", 3);
public(0),
home(1),
followers(2),
specified(3);

final String displayName;
final int priority;
const NoteVisibility(this.displayName, this.priority);
const NoteVisibility(this.priority);

/// 見える範囲が小さい方を返す
static NoteVisibility min(NoteVisibility a, NoteVisibility b) {
Expand Down
10 changes: 3 additions & 7 deletions lib/src/enums/origin.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
enum Origin {
local("ローカル"),
remote("リモート"),
combined("全て");

final String displayName;

const Origin(this.displayName);
local,
remote,
combined,
}
12 changes: 4 additions & 8 deletions lib/src/enums/reaction_acceptance.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
enum ReactionAcceptance {
likeOnlyForRemote("全て(リモートはいいねのみ)"),
nonSensitiveOnly("非センシティブのみ"),
nonSensitiveOnlyForLocalLikeOnlyForRemote("非センシティブのみ(リモートはいいねのみ)"),
likeOnly("いいねのみ");

const ReactionAcceptance(this.displayName);

final String displayName;
likeOnlyForRemote,
nonSensitiveOnly,
nonSensitiveOnlyForLocalLikeOnlyForRemote,
likeOnly,
}
15 changes: 7 additions & 8 deletions lib/src/enums/users_sort_type.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
enum UsersSortType {
followerAscendant("-follower", "フォロワーが少ない順"),
followerDescendant("+follower", "フォロワーが多い順"),
createdAtAscendant("-createdAt", "古い順"),
createdAtDescendant("+createdAt", "新しい順"),
updateAtAscendant("-updatedAt", "更新されていない順"),
updateAtDescendant("+updatedAt", "更新された順");
followerAscendant("-follower"),
followerDescendant("+follower"),
createdAtAscendant("-createdAt"),
createdAtDescendant("+createdAt"),
updateAtAscendant("-updatedAt"),
updateAtDescendant("+updatedAt");

final String value;
final String displayName;
const UsersSortType(this.value, this.displayName);
const UsersSortType(this.value);
}