(Mastodon 3.3)add mute duration
This commit is contained in:
parent
4be3ee1977
commit
cea7c07e81
|
@ -683,12 +683,11 @@ internal class DlgContextMenu(
|
|||
ActText.open(activity, ActMain.REQUEST_CODE_TEXT, access_info, who)
|
||||
|
||||
R.id.btnMute -> when {
|
||||
relation.muting -> Action_User.mute(
|
||||
relation.muting -> Action_User.unmute(
|
||||
activity,
|
||||
access_info,
|
||||
who,
|
||||
access_info,
|
||||
bMute = false
|
||||
access_info
|
||||
)
|
||||
else -> Action_User.muteConfirm(
|
||||
activity,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -141,10 +141,8 @@ open class TootAccount(parser : TootParser, src : JsonObject) : HostAndDomain {
|
|||
|
||||
this.username = src.stringOrThrow("username")
|
||||
|
||||
this.apiHost = src.string("host")?.let { Host.parse(it) }
|
||||
?: parser.apiHost
|
||||
?: error("missing host")
|
||||
|
||||
this.apiHost = src.string("host")?.let { Host.parse(it) } ?: parser.apiHost
|
||||
|
||||
this.url = "https://${apiHost.ascii}/@$username"
|
||||
|
||||
this.apDomain = apiHost // FIXME apiHostとapDomainが異なる場合はMisskeyだとどうなの…?
|
||||
|
|
|
@ -91,8 +91,8 @@ class TootInstance(parser : TootParser, src : JsonObject) {
|
|||
init {
|
||||
if(parser.serviceType == ServiceType.MISSKEY) {
|
||||
|
||||
this.uri = parser.apiHost?.ascii
|
||||
this.title = parser.apiHost?.pretty
|
||||
this.uri = parser.apiHost.ascii
|
||||
this.title = parser.apiHost.pretty
|
||||
val sv = src.jsonObject("maintainer")?.string("url")
|
||||
this.email = when {
|
||||
sv?.startsWith("mailto:") == true -> sv.substring(7)
|
||||
|
|
|
@ -28,4 +28,27 @@
|
|||
android:layout_marginTop="8dp"
|
||||
android:text="@string/dont_confirm_again"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/llMuteDuration"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/duration"
|
||||
/>
|
||||
<Spinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/spMuteDuration"
|
||||
android:minHeight="40dp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -1051,4 +1051,15 @@
|
|||
<string name="stop_notify_posts_from_this_user">このユーザの投稿の通知を解除</string>
|
||||
<string name="gap">ギャップ</string>
|
||||
<string name="powered_by_open_sticker">OpenStickerのAPIを利用します。</string>
|
||||
<string name="duration">期間</string>
|
||||
|
||||
<string name="duration_indefinite">無期限</string>
|
||||
<string name="duration_minutes_5">5分</string>
|
||||
<string name="duration_minutes_30">30分</string>
|
||||
<string name="duration_hours_1">1時間</string>
|
||||
<string name="duration_hours_6">6時間</string>
|
||||
<string name="duration_days_1">1日</string>
|
||||
<string name="duration_days_3">3日</string>
|
||||
<string name="duration_days_7">7日</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1060,4 +1060,14 @@
|
|||
<string name="gap">Gap</string>
|
||||
<string name="powered_by_open_sticker">Using OpenSticker API.</string>
|
||||
<string name="speech">Speech</string>
|
||||
<string name="duration">Duration</string>
|
||||
|
||||
<string name="duration_indefinite">Indefinite</string>
|
||||
<string name="duration_minutes_5">5 minutes</string>
|
||||
<string name="duration_minutes_30">30 minutes</string>
|
||||
<string name="duration_hours_1">1 hour</string>
|
||||
<string name="duration_hours_6">6 hours</string>
|
||||
<string name="duration_days_1">1 day</string>
|
||||
<string name="duration_days_3">3 days</string>
|
||||
<string name="duration_days_7">7 days</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue