Skip to content

Commit

Permalink
Merge pull request #34 from poppingmoon/remove-display-name
Browse files Browse the repository at this point in the history
remove displayName
  • Loading branch information
shiosyakeyakini-info authored Jan 21, 2024
2 parents a412929 + 98a6479 commit 75fb0d0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 29 deletions.
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);
}

0 comments on commit 75fb0d0

Please sign in to comment.