remove SavedToots (#2141)

* remove SavedToots

* fix tests
This commit is contained in:
Konrad Pozniak 2021-05-16 19:17:56 +02:00 committed by GitHub
parent cb3840c699
commit 6c37cc770c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 872 additions and 904 deletions

View file

@ -0,0 +1,747 @@
{
"formatVersion": 1,
"database": {
"version": 26,
"identityHash": "14fb3d5743b7a89e8e62463e05f086ab",
"entities": [
{
"tableName": "DraftEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `accountId` INTEGER NOT NULL, `inReplyToId` TEXT, `content` TEXT, `contentWarning` TEXT, `sensitive` INTEGER NOT NULL, `visibility` INTEGER NOT NULL, `attachments` TEXT NOT NULL, `poll` TEXT, `failedToSend` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "inReplyToId",
"columnName": "inReplyToId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "contentWarning",
"columnName": "contentWarning",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "sensitive",
"columnName": "sensitive",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "visibility",
"columnName": "visibility",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "attachments",
"columnName": "attachments",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "poll",
"columnName": "poll",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "failedToSend",
"columnName": "failedToSend",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "AccountEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `domain` TEXT NOT NULL, `accessToken` TEXT NOT NULL, `isActive` INTEGER NOT NULL, `accountId` TEXT NOT NULL, `username` TEXT NOT NULL, `displayName` TEXT NOT NULL, `profilePictureUrl` TEXT NOT NULL, `notificationsEnabled` INTEGER NOT NULL, `notificationsMentioned` INTEGER NOT NULL, `notificationsFollowed` INTEGER NOT NULL, `notificationsFollowRequested` INTEGER NOT NULL, `notificationsReblogged` INTEGER NOT NULL, `notificationsFavorited` INTEGER NOT NULL, `notificationsPolls` INTEGER NOT NULL, `notificationsSubscriptions` INTEGER NOT NULL, `notificationSound` INTEGER NOT NULL, `notificationVibration` INTEGER NOT NULL, `notificationLight` INTEGER NOT NULL, `defaultPostPrivacy` INTEGER NOT NULL, `defaultMediaSensitivity` INTEGER NOT NULL, `alwaysShowSensitiveMedia` INTEGER NOT NULL, `alwaysOpenSpoiler` INTEGER NOT NULL, `mediaPreviewEnabled` INTEGER NOT NULL, `lastNotificationId` TEXT NOT NULL, `activeNotifications` TEXT NOT NULL, `emojis` TEXT NOT NULL, `tabPreferences` TEXT NOT NULL, `notificationsFilter` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "domain",
"columnName": "domain",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "accessToken",
"columnName": "accessToken",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isActive",
"columnName": "isActive",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "username",
"columnName": "username",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "displayName",
"columnName": "displayName",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "profilePictureUrl",
"columnName": "profilePictureUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "notificationsEnabled",
"columnName": "notificationsEnabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationsMentioned",
"columnName": "notificationsMentioned",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationsFollowed",
"columnName": "notificationsFollowed",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationsFollowRequested",
"columnName": "notificationsFollowRequested",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationsReblogged",
"columnName": "notificationsReblogged",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationsFavorited",
"columnName": "notificationsFavorited",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationsPolls",
"columnName": "notificationsPolls",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationsSubscriptions",
"columnName": "notificationsSubscriptions",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationSound",
"columnName": "notificationSound",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationVibration",
"columnName": "notificationVibration",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notificationLight",
"columnName": "notificationLight",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "defaultPostPrivacy",
"columnName": "defaultPostPrivacy",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "defaultMediaSensitivity",
"columnName": "defaultMediaSensitivity",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "alwaysShowSensitiveMedia",
"columnName": "alwaysShowSensitiveMedia",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "alwaysOpenSpoiler",
"columnName": "alwaysOpenSpoiler",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mediaPreviewEnabled",
"columnName": "mediaPreviewEnabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastNotificationId",
"columnName": "lastNotificationId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "activeNotifications",
"columnName": "activeNotifications",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "emojis",
"columnName": "emojis",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "tabPreferences",
"columnName": "tabPreferences",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "notificationsFilter",
"columnName": "notificationsFilter",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_AccountEntity_domain_accountId",
"unique": true,
"columnNames": [
"domain",
"accountId"
],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_AccountEntity_domain_accountId` ON `${TABLE_NAME}` (`domain`, `accountId`)"
}
],
"foreignKeys": []
},
{
"tableName": "InstanceEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`instance` TEXT NOT NULL, `emojiList` TEXT, `maximumTootCharacters` INTEGER, `maxPollOptions` INTEGER, `maxPollOptionLength` INTEGER, `version` TEXT, PRIMARY KEY(`instance`))",
"fields": [
{
"fieldPath": "instance",
"columnName": "instance",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "emojiList",
"columnName": "emojiList",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "maximumTootCharacters",
"columnName": "maximumTootCharacters",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "maxPollOptions",
"columnName": "maxPollOptions",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "maxPollOptionLength",
"columnName": "maxPollOptionLength",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "version",
"columnName": "version",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"columnNames": [
"instance"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "TimelineStatusEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`serverId` TEXT NOT NULL, `url` TEXT, `timelineUserId` INTEGER NOT NULL, `authorServerId` TEXT, `inReplyToId` TEXT, `inReplyToAccountId` TEXT, `content` TEXT, `createdAt` INTEGER NOT NULL, `emojis` TEXT, `reblogsCount` INTEGER NOT NULL, `favouritesCount` INTEGER NOT NULL, `reblogged` INTEGER NOT NULL, `bookmarked` INTEGER NOT NULL, `favourited` INTEGER NOT NULL, `sensitive` INTEGER NOT NULL, `spoilerText` TEXT, `visibility` INTEGER, `attachments` TEXT, `mentions` TEXT, `application` TEXT, `reblogServerId` TEXT, `reblogAccountId` TEXT, `poll` TEXT, `muted` INTEGER, PRIMARY KEY(`serverId`, `timelineUserId`), FOREIGN KEY(`authorServerId`, `timelineUserId`) REFERENCES `TimelineAccountEntity`(`serverId`, `timelineUserId`) ON UPDATE NO ACTION ON DELETE NO ACTION )",
"fields": [
{
"fieldPath": "serverId",
"columnName": "serverId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "timelineUserId",
"columnName": "timelineUserId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "authorServerId",
"columnName": "authorServerId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "inReplyToId",
"columnName": "inReplyToId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "inReplyToAccountId",
"columnName": "inReplyToAccountId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "createdAt",
"columnName": "createdAt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "emojis",
"columnName": "emojis",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "reblogsCount",
"columnName": "reblogsCount",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "favouritesCount",
"columnName": "favouritesCount",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "reblogged",
"columnName": "reblogged",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "bookmarked",
"columnName": "bookmarked",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "favourited",
"columnName": "favourited",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "sensitive",
"columnName": "sensitive",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "spoilerText",
"columnName": "spoilerText",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "visibility",
"columnName": "visibility",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "attachments",
"columnName": "attachments",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mentions",
"columnName": "mentions",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "application",
"columnName": "application",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "reblogServerId",
"columnName": "reblogServerId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "reblogAccountId",
"columnName": "reblogAccountId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "poll",
"columnName": "poll",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "muted",
"columnName": "muted",
"affinity": "INTEGER",
"notNull": false
}
],
"primaryKey": {
"columnNames": [
"serverId",
"timelineUserId"
],
"autoGenerate": false
},
"indices": [
{
"name": "index_TimelineStatusEntity_authorServerId_timelineUserId",
"unique": false,
"columnNames": [
"authorServerId",
"timelineUserId"
],
"createSql": "CREATE INDEX IF NOT EXISTS `index_TimelineStatusEntity_authorServerId_timelineUserId` ON `${TABLE_NAME}` (`authorServerId`, `timelineUserId`)"
}
],
"foreignKeys": [
{
"table": "TimelineAccountEntity",
"onDelete": "NO ACTION",
"onUpdate": "NO ACTION",
"columns": [
"authorServerId",
"timelineUserId"
],
"referencedColumns": [
"serverId",
"timelineUserId"
]
}
]
},
{
"tableName": "TimelineAccountEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`serverId` TEXT NOT NULL, `timelineUserId` INTEGER NOT NULL, `localUsername` TEXT NOT NULL, `username` TEXT NOT NULL, `displayName` TEXT NOT NULL, `url` TEXT NOT NULL, `avatar` TEXT NOT NULL, `emojis` TEXT NOT NULL, `bot` INTEGER NOT NULL, PRIMARY KEY(`serverId`, `timelineUserId`))",
"fields": [
{
"fieldPath": "serverId",
"columnName": "serverId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "timelineUserId",
"columnName": "timelineUserId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "localUsername",
"columnName": "localUsername",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "username",
"columnName": "username",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "displayName",
"columnName": "displayName",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "avatar",
"columnName": "avatar",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "emojis",
"columnName": "emojis",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "bot",
"columnName": "bot",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"serverId",
"timelineUserId"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "ConversationEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `id` TEXT NOT NULL, `accounts` TEXT NOT NULL, `unread` INTEGER NOT NULL, `s_id` TEXT NOT NULL, `s_url` TEXT, `s_inReplyToId` TEXT, `s_inReplyToAccountId` TEXT, `s_account` TEXT NOT NULL, `s_content` TEXT NOT NULL, `s_createdAt` INTEGER NOT NULL, `s_emojis` TEXT NOT NULL, `s_favouritesCount` INTEGER NOT NULL, `s_favourited` INTEGER NOT NULL, `s_bookmarked` INTEGER NOT NULL, `s_sensitive` INTEGER NOT NULL, `s_spoilerText` TEXT NOT NULL, `s_attachments` TEXT NOT NULL, `s_mentions` TEXT NOT NULL, `s_showingHiddenContent` INTEGER NOT NULL, `s_expanded` INTEGER NOT NULL, `s_collapsible` INTEGER NOT NULL, `s_collapsed` INTEGER NOT NULL, `s_poll` TEXT, PRIMARY KEY(`id`, `accountId`))",
"fields": [
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "id",
"columnName": "id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "accounts",
"columnName": "accounts",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "unread",
"columnName": "unread",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.id",
"columnName": "s_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastStatus.url",
"columnName": "s_url",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "lastStatus.inReplyToId",
"columnName": "s_inReplyToId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "lastStatus.inReplyToAccountId",
"columnName": "s_inReplyToAccountId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "lastStatus.account",
"columnName": "s_account",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastStatus.content",
"columnName": "s_content",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastStatus.createdAt",
"columnName": "s_createdAt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.emojis",
"columnName": "s_emojis",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastStatus.favouritesCount",
"columnName": "s_favouritesCount",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.favourited",
"columnName": "s_favourited",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.bookmarked",
"columnName": "s_bookmarked",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.sensitive",
"columnName": "s_sensitive",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.spoilerText",
"columnName": "s_spoilerText",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastStatus.attachments",
"columnName": "s_attachments",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastStatus.mentions",
"columnName": "s_mentions",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastStatus.showingHiddenContent",
"columnName": "s_showingHiddenContent",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.expanded",
"columnName": "s_expanded",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.collapsible",
"columnName": "s_collapsible",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.collapsed",
"columnName": "s_collapsed",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastStatus.poll",
"columnName": "s_poll",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"columnNames": [
"id",
"accountId"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '14fb3d5743b7a89e8e62463e05f086ab')"
]
}
}

View file

@ -31,7 +31,6 @@ import android.widget.ImageView
import androidx.appcompat.app.AlertDialog
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.ContextCompat
import androidx.core.content.edit
import androidx.core.content.pm.ShortcutManagerCompat
import androidx.emoji.text.EmojiCompat
import androidx.emoji.text.EmojiCompat.InitCallback
@ -243,7 +242,6 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
// Flush old media that was cached for sharing
deleteStaleCachedMedia(applicationContext.getExternalFilesDir("Tusky"))
}
draftWarning()
}
override fun onResume() {
@ -417,7 +415,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
}
},
primaryDrawerItem {
nameRes = R.string.action_access_saved_toot
nameRes = R.string.action_access_drafts
iconRes = R.drawable.ic_notebook
onClick = {
val intent = DraftsActivity.newIntent(context)
@ -755,29 +753,6 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
header.setActiveProfile(accountManager.activeAccount!!.id)
}
private fun draftWarning() {
val sharedPrefsKey = "show_draft_warning"
appDb.tootDao().savedTootCount()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.autoDispose(this, Lifecycle.Event.ON_DESTROY)
.subscribe { draftCount ->
val showDraftWarning = preferences.getBoolean(sharedPrefsKey, true)
if (draftCount > 0 && showDraftWarning) {
AlertDialog.Builder(this)
.setMessage(R.string.new_drafts_warning)
.setNegativeButton("Don't show again") { _, _ ->
preferences.edit(commit = true) {
putBoolean(sharedPrefsKey, false)
}
}
.setPositiveButton(android.R.string.ok, null)
.show()
}
}
}
override fun getActionButton(): FloatingActionButton? = binding.composeButton
override fun androidInjector() = androidInjector

View file

@ -1,209 +0,0 @@
/* Copyright 2017 Andrew Dawson
*
* This file is a part of Tusky.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Tusky; if not,
* see <http://www.gnu.org/licenses>. */
package com.keylesspalace.tusky;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.lifecycle.Lifecycle;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.keylesspalace.tusky.adapter.SavedTootAdapter;
import com.keylesspalace.tusky.appstore.EventHub;
import com.keylesspalace.tusky.appstore.StatusComposedEvent;
import com.keylesspalace.tusky.components.compose.ComposeActivity;
import com.keylesspalace.tusky.db.AppDatabase;
import com.keylesspalace.tusky.db.TootDao;
import com.keylesspalace.tusky.db.TootEntity;
import com.keylesspalace.tusky.di.Injectable;
import com.keylesspalace.tusky.util.SaveTootHelper;
import com.keylesspalace.tusky.view.BackgroundMessageView;
import java.lang.ref.WeakReference;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import io.reactivex.android.schedulers.AndroidSchedulers;
import static com.keylesspalace.tusky.components.compose.ComposeActivity.ComposeOptions;
import static com.uber.autodispose.AutoDispose.autoDisposable;
import static com.uber.autodispose.android.lifecycle.AndroidLifecycleScopeProvider.from;
public final class SavedTootActivity extends BaseActivity implements SavedTootAdapter.SavedTootAction,
Injectable {
// ui
private SavedTootAdapter adapter;
private BackgroundMessageView errorMessageView;
private List<TootEntity> toots = new ArrayList<>();
@Nullable
private AsyncTask<?, ?, ?> asyncTask;
@Inject
EventHub eventHub;
@Inject
AppDatabase database;
@Inject
SaveTootHelper saveTootHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
eventHub.getEvents()
.observeOn(AndroidSchedulers.mainThread())
.ofType(StatusComposedEvent.class)
.as(autoDisposable(from(this, Lifecycle.Event.ON_DESTROY)))
.subscribe((__) -> this.fetchToots());
setContentView(R.layout.activity_saved_toot);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setTitle(getString(R.string.title_drafts));
bar.setDisplayHomeAsUpEnabled(true);
bar.setDisplayShowHomeEnabled(true);
}
RecyclerView recyclerView = findViewById(R.id.recyclerView);
errorMessageView = findViewById(R.id.errorMessageView);
recyclerView.setHasFixedSize(true);
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
recyclerView.setLayoutManager(layoutManager);
DividerItemDecoration divider = new DividerItemDecoration(
this, layoutManager.getOrientation());
recyclerView.addItemDecoration(divider);
adapter = new SavedTootAdapter(this);
recyclerView.setAdapter(adapter);
}
@Override
protected void onResume() {
super.onResume();
fetchToots();
}
@Override
protected void onPause() {
super.onPause();
if (asyncTask != null) asyncTask.cancel(true);
}
private void fetchToots() {
asyncTask = new FetchPojosTask(this, database.tootDao())
.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
private void setNoContent(int size) {
if (size == 0) {
errorMessageView.setup(R.drawable.elephant_friend_empty, R.string.no_saved_status, null);
errorMessageView.setVisibility(View.VISIBLE);
} else {
errorMessageView.setVisibility(View.GONE);
}
}
@Override
public void delete(int position, TootEntity item) {
saveTootHelper.deleteDraft(item);
toots.remove(position);
// update adapter
if (adapter != null) {
adapter.removeItem(position);
setNoContent(toots.size());
}
}
@Override
public void click(int position, TootEntity item) {
Gson gson = new Gson();
Type stringListType = new TypeToken<List<String>>() {}.getType();
List<String> jsonUrls = gson.fromJson(item.getUrls(), stringListType);
List<String> descriptions = gson.fromJson(item.getDescriptions(), stringListType);
ComposeOptions composeOptions = new ComposeOptions(
/*scheduledTootUid*/null,
item.getUid(),
/*drafId*/null,
item.getText(),
jsonUrls,
descriptions,
/*mentionedUsernames*/null,
item.getInReplyToId(),
/*replyVisibility*/null,
item.getVisibility(),
item.getContentWarning(),
item.getInReplyToUsername(),
item.getInReplyToText(),
/*mediaAttachments*/null,
/*draftAttachments*/null,
/*scheduledAt*/null,
/*sensitive*/null,
/*poll*/null,
/* modifiedInitialState */ true
);
Intent intent = ComposeActivity.startIntent(this, composeOptions);
startActivity(intent);
}
static final class FetchPojosTask extends AsyncTask<Void, Void, List<TootEntity>> {
private final WeakReference<SavedTootActivity> activityRef;
private final TootDao tootDao;
FetchPojosTask(SavedTootActivity activity, TootDao tootDao) {
this.activityRef = new WeakReference<>(activity);
this.tootDao = tootDao;
}
@Override
protected List<TootEntity> doInBackground(Void... voids) {
return tootDao.loadAll();
}
@Override
protected void onPostExecute(List<TootEntity> pojos) {
super.onPostExecute(pojos);
SavedTootActivity activity = activityRef.get();
if (activity == null) return;
activity.toots.clear();
activity.toots.addAll(pojos);
// set ui
activity.setNoContent(pojos.size());
activity.adapter.setItems(activity.toots);
activity.adapter.notifyDataSetChanged();
}
}
}

View file

@ -1,122 +0,0 @@
/* Copyright 2017 Andrew Dawson
*
* This file is a part of Tusky.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Tusky; if not,
* see <http://www.gnu.org/licenses>. */
package com.keylesspalace.tusky.adapter;
import android.content.Context;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.TextView;
import com.keylesspalace.tusky.R;
import com.keylesspalace.tusky.db.TootEntity;
import java.util.ArrayList;
import java.util.List;
public class SavedTootAdapter extends RecyclerView.Adapter {
private List<TootEntity> list;
private SavedTootAction handler;
public SavedTootAdapter(Context context) {
super();
list = new ArrayList<>();
handler = (SavedTootAction) context;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_saved_toot, parent, false);
return new TootViewHolder(view);
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
TootViewHolder holder = (TootViewHolder) viewHolder;
holder.bind(getItem(position));
}
@Override
public int getItemCount() {
return list.size();
}
public void setItems(List<TootEntity> newToot) {
list = new ArrayList<>();
list.addAll(newToot);
}
public void addItems(List<TootEntity> newToot) {
int end = list.size();
list.addAll(newToot);
notifyItemRangeInserted(end, newToot.size());
}
@Nullable
public TootEntity removeItem(int position) {
if (position < 0 || position >= list.size()) {
return null;
}
TootEntity toot = list.remove(position);
notifyItemRemoved(position);
return toot;
}
private TootEntity getItem(int position) {
if (position >= 0 && position < list.size()) {
return list.get(position);
}
return null;
}
// handler saved toot
public interface SavedTootAction {
void delete(int position, TootEntity item);
void click(int position, TootEntity item);
}
private class TootViewHolder extends RecyclerView.ViewHolder {
View view;
TextView content;
ImageButton suppr;
TootViewHolder(View view) {
super(view);
this.view = view;
this.content = view.findViewById(R.id.content);
this.suppr = view.findViewById(R.id.suppr);
}
void bind(final TootEntity item) {
suppr.setEnabled(true);
if (item != null) {
content.setText(item.getText());
suppr.setOnClickListener(v -> {
v.setEnabled(false);
handler.delete(getBindingAdapterPosition(), item);
});
view.setOnClickListener(v -> handler.click(getBindingAdapterPosition(), item));
}
}
}
}

View file

@ -1013,7 +1013,6 @@ class ComposeActivity : BaseActivity(),
data class ComposeOptions(
// Let's keep fields var until all consumers are Kotlin
var scheduledTootId: String? = null,
var savedTootUid: Int? = null,
var draftId: Int? = null,
var tootText: String? = null,
var mediaUrls: List<String>? = null,

View file

@ -45,14 +45,12 @@ class ComposeViewModel @Inject constructor(
private val mediaUploader: MediaUploader,
private val serviceClient: ServiceClient,
private val draftHelper: DraftHelper,
private val saveTootHelper: SaveTootHelper,
private val db: AppDatabase
) : RxAwareViewModel() {
private var replyingStatusAuthor: String? = null
private var replyingStatusContent: String? = null
internal var startingText: String? = null
private var savedTootUid: Int = 0
private var draftId: Int = 0
private var scheduledTootId: String? = null
private var startingContentWarning: String = ""
@ -216,9 +214,6 @@ class ComposeViewModel @Inject constructor(
}
fun deleteDraft() {
if (savedTootUid != 0) {
saveTootHelper.deleteDraft(savedTootUid)
}
if (draftId != 0) {
draftHelper.deleteDraftAndAttachments(draftId)
.subscribe()
@ -291,7 +286,6 @@ class ComposeViewModel @Inject constructor(
replyingStatusContent = null,
replyingStatusAuthorUsername = null,
accountId = accountManager.activeAccount!!.id,
savedTootUid = savedTootUid,
draftId = draftId,
idempotencyKey = randomAlphanumericString(16),
retries = 0
@ -406,20 +400,8 @@ class ComposeViewModel @Inject constructor(
}
// recreate media list
val loadedDraftMediaUris = composeOptions?.mediaUrls
val loadedDraftMediaDescriptions: List<String?>? = composeOptions?.mediaDescriptions
val draftAttachments = composeOptions?.draftAttachments
if (loadedDraftMediaUris != null && loadedDraftMediaDescriptions != null) {
// when coming from SavedTootActivity
loadedDraftMediaUris.zip(loadedDraftMediaDescriptions)
.forEach { (uri, description) ->
pickMedia(uri.toUri()).observeForever { errorOrItem ->
if (errorOrItem.isRight() && description != null) {
updateDescription(errorOrItem.asRight().localId, description)
}
}
}
} else if (draftAttachments != null) {
if (draftAttachments != null) {
// when coming from DraftActivity
draftAttachments.forEach { attachment -> pickMedia(attachment.uri, attachment.description) }
} else composeOptions?.mediaAttachments?.forEach { a ->
@ -432,7 +414,6 @@ class ComposeViewModel @Inject constructor(
addUploadedMedia(a.id, mediaType, a.url.toUri(), a.description)
}
savedTootUid = composeOptions?.savedTootUid ?: 0
draftId = composeOptions?.draftId ?: 0
scheduledTootId = composeOptions?.scheduledTootId
startingText = composeOptions?.tootText

View file

@ -19,19 +19,15 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.Menu
import android.view.MenuItem
import android.widget.LinearLayout
import android.widget.Toast
import androidx.activity.viewModels
import androidx.lifecycle.Lifecycle
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.snackbar.Snackbar
import com.keylesspalace.tusky.BaseActivity
import com.keylesspalace.tusky.R
import com.keylesspalace.tusky.SavedTootActivity
import com.keylesspalace.tusky.components.compose.ComposeActivity
import com.keylesspalace.tusky.databinding.ActivityDraftsBinding
import com.keylesspalace.tusky.db.DraftEntity
@ -40,7 +36,6 @@ import com.keylesspalace.tusky.util.hide
import com.keylesspalace.tusky.util.show
import com.uber.autodispose.android.lifecycle.autoDispose
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import retrofit2.HttpException
import javax.inject.Inject
@ -54,8 +49,6 @@ class DraftsActivity : BaseActivity(), DraftActionListener {
private lateinit var binding: ActivityDraftsBinding
private lateinit var bottomSheet: BottomSheetBehavior<LinearLayout>
private var oldDraftsButton: MenuItem? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -70,7 +63,7 @@ class DraftsActivity : BaseActivity(), DraftActionListener {
setDisplayShowHomeEnabled(true)
}
binding.draftsErrorMessageView.setup(R.drawable.elephant_friend_empty, R.string.no_saved_status)
binding.draftsErrorMessageView.setup(R.drawable.elephant_friend_empty, R.string.no_drafts)
val adapter = DraftsAdapter(this)
@ -92,34 +85,6 @@ class DraftsActivity : BaseActivity(), DraftActionListener {
}
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.drafts, menu)
oldDraftsButton = menu.findItem(R.id.action_old_drafts)
viewModel.showOldDraftsButton()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.autoDispose(this, Lifecycle.Event.ON_DESTROY)
.subscribe { showOldDraftsButton ->
oldDraftsButton?.isVisible = showOldDraftsButton
}
return true
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
android.R.id.home -> {
onBackPressed()
return true
}
R.id.action_old_drafts -> {
val intent = Intent(this, SavedTootActivity::class.java)
startActivityWithSlideInAnimation(intent)
return true
}
}
return super.onOptionsItemSelected(item)
}
override fun onOpenDraft(draft: DraftEntity) {
if (draft.inReplyToId != null) {

View file

@ -22,7 +22,6 @@ import com.keylesspalace.tusky.db.AppDatabase
import com.keylesspalace.tusky.db.DraftEntity
import com.keylesspalace.tusky.entity.Status
import com.keylesspalace.tusky.network.MastodonApi
import io.reactivex.Observable
import io.reactivex.Single
import javax.inject.Inject
@ -37,11 +36,6 @@ class DraftsViewModel @Inject constructor(
private val deletedDrafts: MutableList<DraftEntity> = mutableListOf()
fun showOldDraftsButton(): Observable<Boolean> {
return database.tootDao().savedTootCount()
.map { count -> count > 0 }
}
fun deleteDraft(draft: DraftEntity) {
// this does not immediately delete media files to avoid unnecessary file operations
// in case the user decides to restore the draft

View file

@ -24,16 +24,17 @@ import androidx.sqlite.db.SupportSQLiteDatabase;
import com.keylesspalace.tusky.TabDataKt;
import com.keylesspalace.tusky.components.conversation.ConversationEntity;
import java.io.File;
/**
* DB version & declare DAO
*/
@Database(entities = { TootEntity.class, DraftEntity.class, AccountEntity.class, InstanceEntity.class, TimelineStatusEntity.class,
@Database(entities = { DraftEntity.class, AccountEntity.class, InstanceEntity.class, TimelineStatusEntity.class,
TimelineAccountEntity.class, ConversationEntity.class
}, version = 25)
}, version = 26)
public abstract class AppDatabase extends RoomDatabase {
public abstract TootDao tootDao();
public abstract AccountDao accountDao();
public abstract InstanceDao instanceDao();
public abstract ConversationsDao conversationDao();
@ -365,4 +366,31 @@ public abstract class AppDatabase extends RoomDatabase {
);
}
};
public static class Migration25_26 extends Migration {
private final File oldDraftDirectory;
public Migration25_26(File oldDraftDirectory) {
super(25, 26);
this.oldDraftDirectory = oldDraftDirectory;
}
@Override
public void migrate(@NonNull SupportSQLiteDatabase database) {
database.execSQL("DROP TABLE `TootEntity`");
if (oldDraftDirectory != null && oldDraftDirectory.isDirectory()) {
File[] oldDraftFiles = oldDraftDirectory.listFiles();
if (oldDraftFiles != null) {
for (File file : oldDraftFiles) {
if (!file.isDirectory()) {
file.delete();
}
}
}
}
}
}
}

View file

@ -1,45 +0,0 @@
/* Copyright 2017 Andrew Dawson
*
* This file is a part of Tusky.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Tusky; if not,
* see <http://www.gnu.org/licenses>. */
package com.keylesspalace.tusky.db;
import androidx.room.Dao;
import androidx.room.Query;
import java.util.List;
import io.reactivex.Observable;
/**
* Created by cto3543 on 28/06/2017.
*
* DAO to fetch and update toots in the DB.
*/
@Dao
public interface TootDao {
@Query("SELECT * FROM TootEntity ORDER BY uid DESC")
List<TootEntity> loadAll();
@Query("DELETE FROM TootEntity WHERE uid = :uid")
int delete(int uid);
@Query("SELECT * FROM TootEntity WHERE uid = :uid")
TootEntity find(int uid);
@Query("SELECT COUNT(*) FROM TootEntity")
Observable<Integer> savedTootCount();
}

View file

@ -1,151 +0,0 @@
/* Copyright 2017 Andrew Dawson
*
* This file is a part of Tusky.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Tusky; if not,
* see <http://www.gnu.org/licenses>. */
package com.keylesspalace.tusky.db;
import com.google.gson.Gson;
import com.keylesspalace.tusky.entity.NewPoll;
import com.keylesspalace.tusky.entity.Status;
import androidx.annotation.Nullable;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverter;
import androidx.room.TypeConverters;
/**
* Toot model.
*/
@Entity
@TypeConverters(TootEntity.Converters.class)
public class TootEntity {
@PrimaryKey(autoGenerate = true)
private final int uid;
@ColumnInfo(name = "text")
private final String text;
@ColumnInfo(name = "urls")
private final String urls;
@ColumnInfo(name = "descriptions")
private final String descriptions;
@ColumnInfo(name = "contentWarning")
private final String contentWarning;
@ColumnInfo(name = "inReplyToId")
private final String inReplyToId;
@Nullable
@ColumnInfo(name = "inReplyToText")
private final String inReplyToText;
@Nullable
@ColumnInfo(name = "inReplyToUsername")
private final String inReplyToUsername;
@ColumnInfo(name = "visibility")
private final Status.Visibility visibility;
@Nullable
@ColumnInfo(name = "poll")
private final NewPoll poll;
public TootEntity(int uid, String text, String urls, String descriptions, String contentWarning, String inReplyToId,
@Nullable String inReplyToText, @Nullable String inReplyToUsername,
Status.Visibility visibility, @Nullable NewPoll poll) {
this.uid = uid;
this.text = text;
this.urls = urls;
this.descriptions = descriptions;
this.contentWarning = contentWarning;
this.inReplyToId = inReplyToId;
this.inReplyToText = inReplyToText;
this.inReplyToUsername = inReplyToUsername;
this.visibility = visibility;
this.poll = poll;
}
public String getText() {
return text;
}
public String getContentWarning() {
return contentWarning;
}
public int getUid() {
return uid;
}
public String getUrls() {
return urls;
}
public String getDescriptions() {
return descriptions;
}
public String getInReplyToId() {
return inReplyToId;
}
@Nullable
public String getInReplyToText() {
return inReplyToText;
}
@Nullable
public String getInReplyToUsername() {
return inReplyToUsername;
}
public Status.Visibility getVisibility() {
return visibility;
}
@Nullable
public NewPoll getPoll() {
return poll;
}
public static final class Converters {
private static final Gson gson = new Gson();
@TypeConverter
public Status.Visibility visibilityFromInt(int number) {
return Status.Visibility.byNum(number);
}
@TypeConverter
public int intFromVisibility(Status.Visibility visibility) {
return visibility == null ? Status.Visibility.UNKNOWN.getNum() : visibility.getNum();
}
@TypeConverter
public String pollToString(NewPoll poll) {
return gson.toJson(poll);
}
@TypeConverter
public NewPoll stringToPoll(String poll) {
return gson.fromJson(poll, NewPoll.class);
}
}
}

View file

@ -79,9 +79,6 @@ abstract class ActivitiesModule {
@ContributesAndroidInjector
abstract fun contributesSplashActivity(): SplashActivity
@ContributesAndroidInjector
abstract fun contributesSavedTootActivity(): SavedTootActivity
@ContributesAndroidInjector(modules = [FragmentBuildersModule::class])
abstract fun contributesPreferencesActivity(): PreferencesActivity

View file

@ -82,7 +82,9 @@ class AppModule {
AppDatabase.MIGRATION_13_14, AppDatabase.MIGRATION_14_15, AppDatabase.MIGRATION_15_16,
AppDatabase.MIGRATION_16_17, AppDatabase.MIGRATION_17_18, AppDatabase.MIGRATION_18_19,
AppDatabase.MIGRATION_19_20, AppDatabase.MIGRATION_20_21, AppDatabase.MIGRATION_21_22,
AppDatabase.MIGRATION_22_23, AppDatabase.MIGRATION_23_24, AppDatabase.MIGRATION_24_25)
AppDatabase.MIGRATION_22_23, AppDatabase.MIGRATION_23_24, AppDatabase.MIGRATION_24_25,
AppDatabase.Migration25_26(appContext.getExternalFilesDir("Tusky"))
)
.build()
}

View file

@ -101,7 +101,6 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() {
replyingStatusContent = null,
replyingStatusAuthorUsername = null,
accountId = account.id,
savedTootUid = -1,
draftId = -1,
idempotencyKey = randomAlphanumericString(16),
retries = 0

View file

@ -26,7 +26,6 @@ import com.keylesspalace.tusky.entity.NewPoll
import com.keylesspalace.tusky.entity.NewStatus
import com.keylesspalace.tusky.entity.Status
import com.keylesspalace.tusky.network.MastodonApi
import com.keylesspalace.tusky.util.SaveTootHelper
import dagger.android.AndroidInjection
import kotlinx.parcelize.Parcelize
import retrofit2.Call
@ -49,8 +48,6 @@ class SendTootService : Service(), Injectable {
lateinit var database: AppDatabase
@Inject
lateinit var draftHelper: DraftHelper
@Inject
lateinit var saveTootHelper: SaveTootHelper
private val tootsToSend = ConcurrentHashMap<Int, TootToSend>()
private val sendCalls = ConcurrentHashMap<Int, Call<Status>>()
@ -162,9 +159,6 @@ class SendTootService : Service(), Injectable {
if (response.isSuccessful) {
// If the status was loaded from a draft, delete the draft and associated media files.
if (tootToSend.savedTootUid != 0) {
saveTootHelper.deleteDraft(tootToSend.savedTootUid)
}
if (tootToSend.draftId != 0) {
draftHelper.deleteDraftAndAttachments(tootToSend.draftId)
.subscribe()
@ -332,7 +326,6 @@ data class TootToSend(
val replyingStatusContent: String?,
val replyingStatusAuthorUsername: String?,
val accountId: Long,
val savedTootUid: Int,
val draftId: Int,
val idempotencyKey: String,
var retries: Int

View file

@ -1,57 +0,0 @@
package com.keylesspalace.tusky.util;
import android.content.Context;
import android.net.Uri;
import android.util.Log;
import androidx.annotation.NonNull;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.keylesspalace.tusky.db.AppDatabase;
import com.keylesspalace.tusky.db.TootDao;
import com.keylesspalace.tusky.db.TootEntity;
import java.util.ArrayList;
import javax.inject.Inject;
public final class SaveTootHelper {
private static final String TAG = "SaveTootHelper";
private TootDao tootDao;
private Context context;
private Gson gson = new Gson();
@Inject
public SaveTootHelper(@NonNull AppDatabase appDatabase, @NonNull Context context) {
this.tootDao = appDatabase.tootDao();
this.context = context;
}
public void deleteDraft(int tootId) {
TootEntity item = tootDao.find(tootId);
if (item != null) {
deleteDraft(item);
}
}
public void deleteDraft(@NonNull TootEntity item) {
// Delete any media files associated with the status.
ArrayList<String> uris = gson.fromJson(item.getUrls(),
new TypeToken<ArrayList<String>>() {
}.getType());
if (uris != null) {
for (String uriString : uris) {
Uri uri = Uri.parse(uriString);
if (context.getContentResolver().delete(uri, null, null) == 0) {
Log.e(TAG, String.format("Did not delete file %s.", uriString));
}
}
}
// update DB
tootDao.delete(item.getUid());
}
}

View file

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_view_thread"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.keylesspalace.tusky.AccountListActivity">
<include layout="@layout/toolbar_basic" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.keylesspalace.tusky.view.BackgroundMessageView
android:id="@+id/errorMessageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@android:color/transparent"
android:visibility="gone"
tools:src="@drawable/elephant_error"
tools:visibility="visible" />
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<androidx.emoji.widget.EmojiTextView
android:id="@+id/content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.91"
android:padding="8dp"
android:textSize="?attr/status_text_medium" />
<ImageButton
android:id="@+id/suppr"
style="@style/TuskyImageButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center_vertical"
android:layout_margin="12dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/action_delete"
android:padding="4dp"
app:srcCompat="@drawable/ic_clear_24dp" />
</LinearLayout>

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_old_drafts"
android:icon="@drawable/ic_notebook"
android:title="@string/old_drafts"
android:visible="false"
app:showAsAction="ifRoom" />
</menu>

View file

@ -101,7 +101,7 @@
<string name="action_accept">موافقة</string>
<string name="action_reject">رفض</string>
<string name="action_search">البحث</string>
<string name="action_access_saved_toot">المسودات</string>
<string name="action_access_drafts">المسودات</string>
<string name="action_toggle_visibility">كيفية عرض التبويق</string>
<string name="action_content_warning">تحذير عن المحتوى</string>
<string name="action_emoji_keyboard">لوحة مفاتيح الإيموجي</string>
@ -473,7 +473,7 @@
<string name="description_status_bookmarked">أضيف إلى الفواصل المرجعية</string>
<string name="select_list_title">اختر قائمة</string>
<string name="list">القائمة</string>
<string name="no_saved_status">ليس لديك أية مسودات.</string>
<string name="no_drafts">ليس لديك أية مسودات.</string>
<string name="no_scheduled_status">ليس لديك أية منشورات مُبرمَجة للنشر.</string>
<string name="error_audio_upload_size">يجب أن يكون حجم الملفات الصوتية أقل مِن 40 ميغابايت.</string>
<string name="warning_scheduling_interval">تُقدّر أدنى فترة لبرمجة النشر في ماستدون بـ 5 دقائق.</string>

View file

@ -28,7 +28,7 @@
<string name="link_whats_an_instance"> ⴰⵛⵓ ⵓⴸ ⵜⵜⵓⵎⵎⴰⵏⵜ\?</string>
<string name="notification_favourite_name">ⵉⵙⵎⴻⵏⵢⵉⴼⴻⵏ</string>
<string name="action_remove">ⴽⴽⴻⵙ</string>
<string name="action_access_saved_toot">ⵉⵔⴻⵡⵡⴰⵢⴻⵏ</string>
<string name="action_access_drafts">ⵉⵔⴻⵡⵡⴰⵢⴻⵏ</string>
<string name="title_blocks">ⵉⵎⵙⴻⵇⴷⴰⵛⴻⵏ ⵜⵙⵡⴰⵃⵍⴻⵎ</string>
<string name="pref_title_status_tabs">ⵉⵛⵛⴰⵔⴻⵏ</string>
<string name="hint_domain">ⴰⵏⵜⴰ ⵝⵓⵎⵎⴰⵏⵜ\?</string>

View file

@ -320,7 +320,7 @@
<string name="action_content_warning">Предупреждение за съдържание</string>
<string name="action_toggle_visibility">Видимост на публикация</string>
<string name="action_access_scheduled_toot">Планирани публикации</string>
<string name="action_access_saved_toot">Чернови</string>
<string name="action_access_drafts">Чернови</string>
<string name="action_search">Търсене</string>
<string name="action_reject">Отхвърляне</string>
<string name="action_accept">Приемане</string>
@ -442,9 +442,6 @@
<string name="error_generic">Възникна грешка.</string>
<string name="draft_deleted">Черновата е изтрита</string>
<string name="drafts_failed_loading_reply">Неуспешно зареждане на информация за отговор</string>
<string name="old_drafts">Стари чернови</string>
<string name="new_drafts_warning">Функцията за чернови в Tusky е напълно преработена, за да бъде по-бърза, по-лесна за ползване и по-малко бъгава.
\n Все още можете да осъществите достъп до старите си чернови чрез бутон на екрана за нови чернови, но те ще бъдат премахнати при бъдеща актуализация!</string>
<string name="drafts_toot_failed_to_send">Тази публикация не успя да се изпрати!</string>
<string name="dialog_delete_list_warning">Наистина ли искате да изтриете списъка %s\?</string>
<plurals name="error_upload_max_media_reached">
@ -470,7 +467,7 @@
<string name="warning_scheduling_interval">Mastodon има минимален интервал за планиране от 5 минути.</string>
<string name="no_announcements">Няма оповестявания.</string>
<string name="no_scheduled_status">Нямате планирани състояния.</string>
<string name="no_saved_status">Нямате чернови.</string>
<string name="no_drafts">Нямате чернови.</string>
<string name="post_lookup_error_format">Грешка при търсенето на публикация %s</string>
<string name="edit_poll">Редакция</string>
<string name="poll_new_choice_hint">Избор %d</string>

View file

@ -236,7 +236,7 @@
<string name="action_emoji_keyboard">ইমোজি কীবোর্ড</string>
<string name="action_content_warning">সতর্কবার্তা</string>
<string name="action_toggle_visibility">টুট দৃশ্যমানতা</string>
<string name="action_access_saved_toot">ড্রাফটগুলি</string>
<string name="action_access_drafts">ড্রাফটগুলি</string>
<string name="action_search">অনুসন্ধান</string>
<string name="action_reject">প্রত্যাখ্যান</string>
<string name="action_accept">গ্রহণ</string>
@ -331,7 +331,7 @@
<string name="action_mute_conversation">আলাপ বন্ধ করো</string>
<string name="warning_scheduling_interval">মাস্টোডনের সর্বনিম্ন ৫ মিনিটের সময়সূচীর বিরতি আছে।</string>
<string name="error_audio_upload_size">অডিও ফাইলগুলি অবশ্যই MB এর চেয়ে কম হওয়া উচিত।</string>
<string name="no_saved_status">তোমার কোনো খসড়া নেই।</string>
<string name="no_drafts">তোমার কোনো খসড়া নেই।</string>
<string name="no_scheduled_status">তোমার কোনো সময়সূচীত স্ট্যাটাস নেই।</string>
<string name="list">তালিকা</string>
<string name="select_list_title">তালিকা নির্বাচন করো</string>

View file

@ -102,7 +102,7 @@
<string name="action_accept">গ্রহণ</string>
<string name="action_reject">প্রত্যাখ্যান</string>
<string name="action_search">অনুসন্ধান</string>
<string name="action_access_saved_toot">খসড়াগুলো</string>
<string name="action_access_drafts">খসড়াগুলো</string>
<string name="action_toggle_visibility">টুট দৃশ্যমানতা</string>
<string name="action_content_warning">সতর্কবার্তা</string>
<string name="action_emoji_keyboard">ইমোজি কীবোর্ড</string>
@ -473,7 +473,7 @@
<string name="pref_title_enable_swipe_for_tabs">ট্যাবের মাঝে সোয়াইপ সংকেত চালু করো</string>
<string name="pref_title_show_cards_in_timelines">টাইমলাইনে লিঙ্ক প্রিভিউ দেখাও</string>
<string name="no_scheduled_status">তোমার কোনো সময়সূচীত স্ট্যাটাস নেই।</string>
<string name="no_saved_status">তোমার কোনো খসড়া নেই।</string>
<string name="no_drafts">তোমার কোনো খসড়া নেই।</string>
<string name="warning_scheduling_interval">মাস্টোডনের সর্বনিম্ন ৫ মিনিটের সময়সূচীর বিরতি আছে।</string>
<string name="pref_title_hide_top_toolbar">শীর্ষস্থানীয় সরঞ্জামদণ্ডের শিরোনামটি লুকান</string>
</resources>

View file

@ -80,7 +80,7 @@
<string name="action_accept">D\'acord</string>
<string name="action_reject">Rebutja</string>
<string name="action_search">Cerca</string>
<string name="action_access_saved_toot">Esborranys</string>
<string name="action_access_drafts">Esborranys</string>
<string name="download_image">S\'està baixant %1$s</string>
<string name="action_copy_link">Copia l\'enllaç</string>
<string name="send_status_link_to">Comparteix l\'URL del toot a…</string>
@ -433,7 +433,7 @@
<string name="post_lookup_error_format">S\'ha produït un error en cercar la publicació %s</string>
<string name="no_scheduled_status">No tens cap estat planificat.</string>
<string name="error_audio_upload_size">Els fitxers d\'àudio han de ser de mida menor de 40MB.</string>
<string name="no_saved_status">No teniu cap esborrany.</string>
<string name="no_drafts">No teniu cap esborrany.</string>
<string name="warning_scheduling_interval">L\'interval mínim de planificació a Mastodon és de 5 minuts.</string>
<string name="notification_follow_request_name">Peticions de seguiment</string>
<string name="pref_title_confirm_reblogs">Mostra el diàleg de confirmació abans de promoure</string>
@ -496,7 +496,6 @@
<string name="drafts_toot_reply_removed">S\'ha esborrat el tut del qual en vau fer un esborrany de resposta</string>
<string name="draft_deleted">S\'ha eliminat l\'esborrany</string>
<string name="drafts_failed_loading_reply">No s\'ha pogut carregar la informació de la resposta</string>
<string name="old_drafts">Esborranys antics</string>
<string name="drafts_toot_failed_to_send">No s\'ha pogut enviar aquest tut!</string>
<string name="dialog_delete_list_warning">Segur que voleu esborrar la llista %s\?</string>
<plurals name="error_upload_max_media_reached">

View file

@ -34,7 +34,7 @@
<string name="action_content_warning">ئاگاداری ناوەڕۆک</string>
<string name="action_toggle_visibility">بینینی توت</string>
<string name="action_access_scheduled_toot">توتی خشتەکراو</string>
<string name="action_access_saved_toot">ڕەشنووسەکان</string>
<string name="action_access_drafts">ڕەشنووسەکان</string>
<string name="action_search">گەڕان</string>
<string name="action_reject">ڕەتکردنەوە</string>
<string name="action_accept">ڕازیبون</string>
@ -257,7 +257,7 @@
<string name="warning_scheduling_interval">ماستۆدۆن کەمترین ماوەی خشتەی هەیە لە ٥ خولەک.</string>
<string name="no_announcements">هیچ ڕاگه یه نراوێک له بەرده رنه کەون.</string>
<string name="no_scheduled_status">هیچ بارێکی خشتەکراوت نیە.</string>
<string name="no_saved_status">هیچ ڕەشنووسێکت نییە.</string>
<string name="no_drafts">هیچ ڕەشنووسێکت نییە.</string>
<string name="post_lookup_error_format">هەڵە لە گەڕان بەدوای بابەت %s</string>
<string name="edit_poll">دەستکاریکردن</string>
<string name="poll_new_choice_hint">هەڵبژاردنی %d</string>

View file

@ -101,7 +101,7 @@
<string name="action_accept">Přijmout</string>
<string name="action_reject">Zamítnout</string>
<string name="action_search">Hledat</string>
<string name="action_access_saved_toot">Koncepty</string>
<string name="action_access_drafts">Koncepty</string>
<string name="action_toggle_visibility">Viditelnost tootu</string>
<string name="action_content_warning">Varování o obsahu</string>
<string name="action_emoji_keyboard">Klávesnice s emoji</string>
@ -465,7 +465,7 @@
<string name="pref_title_show_cards_in_timelines">Ukazovat náhledy k odkazům</string>
<string name="warning_scheduling_interval">Mastodon neumožňuje pracovat s intervalem menším než 5 minut.</string>
<string name="no_scheduled_status">Zatím zde nemáte žádné naplánované statusy.</string>
<string name="no_saved_status">Zatím zde nejsou žádné koncepty.</string>
<string name="no_drafts">Zatím zde nejsou žádné koncepty.</string>
<string name="pref_title_enable_swipe_for_tabs">Možnost přetahování prstem pro přechod mezi kartami</string>
<string name="list">Seznam</string>
<string name="add_hashtag_title">Přidat hashtag</string>

View file

@ -92,7 +92,7 @@
<string name="action_accept">Derbyn</string>
<string name="action_reject">Gwrthod</string>
<string name="action_search">Chwilio</string>
<string name="action_access_saved_toot">Drafftiau</string>
<string name="action_access_drafts">Drafftiau</string>
<string name="action_toggle_visibility">Pwy all weld Tŵt</string>
<string name="action_content_warning">Rhybudd cynnwys</string>
<string name="action_emoji_keyboard">Bysellfwrdd emoji</string>

View file

@ -101,7 +101,7 @@
<string name="action_accept">Akzeptieren</string>
<string name="action_reject">Ablehnen</string>
<string name="action_search">Suche</string>
<string name="action_access_saved_toot">Entwürfe</string>
<string name="action_access_drafts">Entwürfe</string>
<string name="action_toggle_visibility">Beitragssichtbarkeit</string>
<string name="action_content_warning">Inhaltswarnung</string>
<string name="action_emoji_keyboard">Emoji</string>
@ -436,7 +436,7 @@
<string name="select_list_title">Liste auswählen</string>
<string name="list">Liste</string>
<string name="post_lookup_error_format">Fehler beim Nachschlagen von Post %s</string>
<string name="no_saved_status">Du hast keine Entwürfe.</string>
<string name="no_drafts">Du hast keine Entwürfe.</string>
<string name="no_scheduled_status">Du hast keine geplanten Beiträge.</string>
<string name="warning_scheduling_interval">Das Datum des geplanten Toots muss mindestens 5 Minuten in der Zukunft liegen.</string>
<string name="notification_follow_request_description">Benachrichtigungen über neue Folgeanfragen</string>
@ -480,9 +480,6 @@
<string name="title_announcements">Ankündigungen</string>
<string name="drafts_toot_reply_removed">Der Beitrag auf den du antworten willst wurde gelöscht</string>
<string name="draft_deleted">Entwurf gelöscht</string>
<string name="old_drafts">Alte Entwürfe</string>
<string name="new_drafts_warning">Das \"Entwürfe\"-Feature in Tusky wurde komplett neu gestaltet um schneller und benutzerfreundlicher zu sein.
\nDu kannst deine alten Entwürfe noch hinter einem Button bei den neuen Entwürfen finden, aber sie werden mit einem zukünftigen Update gelöscht!</string>
<string name="drafts_toot_failed_to_send">Dieser Beitrag konnte nicht gesendet werden!</string>
<string name="dialog_delete_list_warning">Willst du die Liste %s wirklich löschen\?</string>
<plurals name="error_upload_max_media_reached">

View file

@ -101,7 +101,7 @@
<string name="action_accept">Rajtigi</string>
<string name="action_reject">Rifuzi</string>
<string name="action_search">Serĉi</string>
<string name="action_access_saved_toot">Malnetoj</string>
<string name="action_access_drafts">Malnetoj</string>
<string name="action_toggle_visibility">Videblo de la mesaĝo</string>
<string name="action_content_warning">Enhava averto</string>
<string name="action_emoji_keyboard">Klavaro de emoĝioj</string>
@ -438,7 +438,7 @@
<string name="list">Listo</string>
<string name="post_lookup_error_format">Eraro dum elserĉo de la mesaĝo %s</string>
<string name="error_audio_upload_size">Aŭdia dosiero devas esti malpli ol 40MB.</string>
<string name="no_saved_status">Vi ne havas iun ajn malneton.</string>
<string name="no_drafts">Vi ne havas iun ajn malneton.</string>
<string name="no_scheduled_status">Vi ne havas iun ajn planitan mesaĝon.</string>
<string name="notification_follow_request_name">Petoj de sekvado</string>
<string name="hashtags">Kradvortoj</string>

View file

@ -99,7 +99,7 @@
<string name="action_accept">Aceptar</string>
<string name="action_reject">Rechazar</string>
<string name="action_search">Buscar</string>
<string name="action_access_saved_toot">Borradores</string>
<string name="action_access_drafts">Borradores</string>
<string name="action_toggle_visibility">Visibilidad del estado</string>
<string name="action_content_warning">Aviso de contenido</string>
<string name="action_emoji_keyboard">Teclado de emojis</string>
@ -451,7 +451,7 @@
<string name="select_list_title">Seleccionar lista</string>
<string name="list">Lista</string>
<string name="error_audio_upload_size">Los ficheros de audio deben ser menores de 40MB.</string>
<string name="no_saved_status">No tienes ningún borrador.</string>
<string name="no_drafts">No tienes ningún borrador.</string>
<string name="no_scheduled_status">No tienes ningún estado programado.</string>
<string name="warning_scheduling_interval">Mastodon tiene un intervalo de programación mínimo de 5 minutos.</string>
<string name="notification_follow_request_name">Solicitudes</string>
@ -506,9 +506,6 @@
<string name="drafts_toot_reply_removed">El toot al que redactaste una respuesta ha sido eliminado</string>
<string name="draft_deleted">Borrador eliminado</string>
<string name="drafts_failed_loading_reply">Error al cargar la información de respuesta</string>
<string name="old_drafts">Borradores antiguos</string>
<string name="new_drafts_warning">La función de borrador en Tusky se ha rediseñado por completo para que sea más rápida, más fácil de usar y con menos errores.
\nAún puede acceder a sus borradores antiguos a través de un botón en la pantalla de borradores nuevos, ¡pero se eliminarán en una actualización futura!</string>
<string name="drafts_toot_failed_to_send">¡Este toot no se pudo enviar!</string>
<string name="dialog_delete_list_warning">¿Realmente quieres eliminar la lista %s\?</string>
<string name="duration_indefinite">Indefinido</string>

View file

@ -93,7 +93,7 @@
<string name="action_accept">Onartu</string>
<string name="action_reject">Ukatu</string>
<string name="action_search">Bilatu</string>
<string name="action_access_saved_toot">Zirriborroak</string>
<string name="action_access_drafts">Zirriborroak</string>
<string name="action_toggle_visibility">Tutaren ikusgarritasuna</string>
<string name="action_content_warning">Edukiaren abisua</string>
<string name="action_emoji_keyboard">Emoji teklatua</string>
@ -444,7 +444,7 @@
<string name="error_audio_upload_size">Audioak 40MB baino gutxiago izan behar ditu.</string>
<string name="select_list_title">Aukeratu zerrenda</string>
<string name="list">Zerrenda</string>
<string name="no_saved_status">Ez duzu zirriborrorik.</string>
<string name="no_drafts">Ez duzu zirriborrorik.</string>
<string name="no_scheduled_status">Ez duzu tut programaturik.</string>
<string name="warning_scheduling_interval">Mastodonek gutxienez 5 minutuko programazio-tartea du.</string>
<string name="notification_follow_request_name">Eskakizunak</string>

View file

@ -93,7 +93,7 @@
<string name="action_accept">پذیرش</string>
<string name="action_reject">رد</string>
<string name="action_search">جست‌وجو</string>
<string name="action_access_saved_toot">پیش‌نویس‌ها</string>
<string name="action_access_drafts">پیش‌نویس‌ها</string>
<string name="action_toggle_visibility">نمایانی بوق</string>
<string name="action_content_warning">هشدار محتوا</string>
<string name="action_emoji_keyboard">صفحه‌کلید اموجی</string>
@ -439,7 +439,7 @@
<string name="description_status_bookmarked">نشان‌شده</string>
<string name="select_list_title">گزینش فهرست</string>
<string name="list">فهرست</string>
<string name="no_saved_status">هیچ پیش‌نویسی ندارید.</string>
<string name="no_drafts">هیچ پیش‌نویسی ندارید.</string>
<string name="no_scheduled_status">هیچ وضعیت زمان‌بسته‌ای ندارید.</string>
<string name="warning_scheduling_interval">ماستودون، بازهٔ زمان‌بندی‌ای با کمینهٔ ۵ دقیقه دارد.</string>
<string name="pref_title_confirm_reblogs">نمایش گفت‌وگوی تأیید، پیش از تقویت</string>
@ -485,7 +485,6 @@
<string name="action_unsubscribe_account">عدم اشتراک</string>
<string name="action_subscribe_account">اشتراک</string>
<string name="draft_deleted">پیش‌نویس حذف شد</string>
<string name="old_drafts">پیش‌نویس‌های قدیمی</string>
<string name="drafts_toot_failed_to_send">فرستادن این بوق شکست خورد!</string>
<string name="wellbeing_hide_stats_profile">نهفتن آمار کمی روی نمایه‌ها</string>
<string name="wellbeing_hide_stats_posts">نهفتن آمار کمی روی فرسته‌ها</string>
@ -509,8 +508,6 @@
\n - آمار پی‌گیر و فرسته روی نمایه‌ها
\n
\n فرستادن آگاهی‌ها تأثیر نمی‌پذیرد، ولی می‌توانید ترجیحات آگاهیتان را به صورت دستی بازبینی کنید.</string>
<string name="new_drafts_warning">ویژگی پیش‌نویس در تاسکی به صورت کامل بازطرّاحی شده تا سریع‌تر، کاربرپسندتر و کم‌مشکل‌تر باشد.
\n همجنان می‌توانید از طریق دکمه‌ای دز صفحهٔ پیش‌نویس‌های جدید، به پیش‌نویس‌های قدیمیتان دسترسی داشته باشید، ولی در به‌روز رسانی آینده برداشته خواهند شد!</string>
<string name="dialog_delete_list_warning">واقعاً می‌خواهید فهرست %s را حذف کنید؟</string>
<plurals name="error_upload_max_media_reached">
<item quantity="one">نمی‌توانید بیش از %1$d رسانه بارگذارید.</item>

View file

@ -101,7 +101,7 @@
<string name="action_accept">Accepter</string>
<string name="action_reject">Refuser</string>
<string name="action_search">Rechercher</string>
<string name="action_access_saved_toot">Brouillons</string>
<string name="action_access_drafts">Brouillons</string>
<string name="action_toggle_visibility">Visibilité du pouet</string>
<string name="action_content_warning">Contenu sensible</string>
<string name="action_emoji_keyboard">Clavier démojis</string>
@ -456,7 +456,7 @@
<string name="select_list_title">Sélectionner la liste</string>
<string name="list">Liste</string>
<string name="error_audio_upload_size">Les fichiers audio doivent avoir moins de 40 Mo.</string>
<string name="no_saved_status">Vous navez aucun brouillon.</string>
<string name="no_drafts">Vous navez aucun brouillon.</string>
<string name="no_scheduled_status">Vous navez aucun pouet planifié.</string>
<string name="warning_scheduling_interval">Lintervalle minimum de planification sur Mastodon est de 5 minutes.</string>
<string name="notification_follow_request_name">Demandes d\'abonnement</string>

View file

@ -109,7 +109,7 @@
<string name="action_content_warning">Rabhadh ábhair</string>
<string name="action_toggle_visibility">Infheictheacht tút</string>
<string name="action_access_scheduled_toot">Tútanna sceidealta</string>
<string name="action_access_saved_toot">Dréachtaí</string>
<string name="action_access_drafts">Dréachtaí</string>
<string name="action_reject">Diúltaigh</string>
<string name="action_accept">Glac</string>
<string name="action_undo">Cealaigh</string>
@ -463,7 +463,7 @@
<string name="poll_new_choice_hint">Rogha %d</string>
<string name="edit_poll">Cuir in Eagar</string>
<string name="post_lookup_error_format">Earráid agus an post á lorg %s</string>
<string name="no_saved_status">Níl aon dréachtaí agat.</string>
<string name="no_drafts">Níl aon dréachtaí agat.</string>
<string name="no_scheduled_status">Níl aon stádas sceidealta agat.</string>
<string name="warning_scheduling_interval">Tá eatramh sceidealaithe íosta 5 nóiméad ag Mastodon.</string>
<string name="pref_title_show_cards_in_timelines">Taispeáin réamhamhairc nasc in amlínte</string>

View file

@ -47,7 +47,7 @@
<string name="compose_shortcut_short_label">Sgrìobh</string>
<string name="pref_title_show_boosts">Seall na brosnachaidhean</string>
<string name="action_open_reblogged_by">Seall na brosnachaidhean</string>
<string name="action_access_saved_toot">Dreachdan</string>
<string name="action_access_drafts">Dreachdan</string>
<string name="action_view_favourites">Annsachdan</string>
<string name="pref_title_notifications_enabled">Brathan</string>
<string name="title_notifications">Brathan</string>
@ -58,10 +58,7 @@
<string name="drafts_toot_reply_removed">Bha againn ris a phost a bha thu airson freagairt dha a thoirt air falbh</string>
<string name="draft_deleted">Chaidh an dreach a sguabadh às</string>
<string name="drafts_failed_loading_reply">Cha deach leinn fiosrachadh na freagairte a luchdadh</string>
<string name="old_drafts">Seann-dreachdan</string>
<string name="new_drafts_warning">Chaidh dealbhadh gu tur ùr a chur air gleus nan dreachdan aig Tusky ach am biodh e nas luaithe, nas fhasa cleachdadh is nas lugha de bhugaichean ann.
\n Gheibh thu grèim air na seann-dreachdan agad fhathast le putan air sgrìn ùr nan dreachdan ach thèid an toirt air falbh le ùrachadh ri teachd!</string>
<string name="drafts_toot_failed_to_send">Cha b urrainn dhuinn am post a chur!</string>
<string name="drafts_toot_failed_to_send">Cha b urrainn dhuinn an dùd a chur!</string>
<string name="status_media_attachments">Ceanglachain</string>
<string name="status_media_audio">Fuaim</string>
<string name="dialog_delete_list_warning">A bheil thu cinnteach gu bheil thu airson an liosta %s a sguabadh às\?</string>
@ -108,7 +105,7 @@
<string name="pref_title_show_cards_in_timelines">Seall ro-sheallaidhean air ceanglaichean sna loidhnichean-ama</string>
<string name="warning_scheduling_interval">Feumaidh co-dhiù 5 mionaidean a bhith eadar staidean sgeidealaichte air Mastodon.</string>
<string name="no_scheduled_status">Chan eil staid sam bith air an sgeideal agad.</string>
<string name="no_saved_status">Chan eil dreachd sam bith agad.</string>
<string name="no_drafts">Chan eil dreachd sam bith agad.</string>
<string name="post_lookup_error_format">Thachair mearachd le lorg a phuist %s</string>
<string name="poll_new_choice_hint">Roghainn %d</string>
<string name="poll_allow_multiple_choices">Iomadh roghainn</string>

View file

@ -3,7 +3,7 @@
<string name="action_content_warning">Aviso sobre o contido</string>
<string name="action_toggle_visibility">Visibilidade do toot</string>
<string name="action_access_scheduled_toot">Toots programados</string>
<string name="action_access_saved_toot">Borradores</string>
<string name="action_access_drafts">Borradores</string>
<string name="action_search">Buscar</string>
<string name="action_reject">Rexeitar</string>
<string name="action_accept">Aceptar</string>
@ -438,9 +438,6 @@
<string name="hint_compose">Que contas\?</string>
<string name="draft_deleted">Borrador eliminado</string>
<string name="drafts_failed_loading_reply">Fallou a carga da información da Resposta</string>
<string name="old_drafts">Borradores antigos</string>
<string name="new_drafts_warning">Os borradores en Tusky foron redeseñados para ser máis rápidos, amigables para a usuaria e con menos fallos.
\nAínda podes acceder aos antigos borradores a través do botón na pantalla de novos borradores, pero eliminarémolo en futuras actualizacións!</string>
<string name="drafts_toot_failed_to_send">Fallou o envío do toot!</string>
<string name="dialog_delete_list_warning">Tes a certeza de querer eliminar a listaxe %s\?</string>
<plurals name="error_upload_max_media_reached">
@ -467,7 +464,7 @@
<string name="warning_scheduling_interval">Mastodon ten un intervalo mínimo de 5 minutos para as programacións.</string>
<string name="no_announcements">Non hai anuncios.</string>
<string name="no_scheduled_status">Non tes estados programados.</string>
<string name="no_saved_status">Non tes borradores.</string>
<string name="no_drafts">Non tes borradores.</string>
<string name="post_lookup_error_format">Erro ao buscar publicación %s</string>
<string name="edit_poll">Editar</string>
<string name="poll_new_choice_hint">Opción %d</string>

View file

@ -152,7 +152,7 @@
<string name="action_toggle_visibility">टूट दृश्यता</string>
<string name="action_access_scheduled_toot">अनुसूचित टूट</string>
<string name="action_accept">स्वीकार करें</string>
<string name="action_access_saved_toot">ड्राफ्ट</string>
<string name="action_access_drafts">ड्राफ्ट</string>
<string name="action_reject">अस्वीकार करें</string>
<string name="action_undo">पूर्ववत करें</string>
<string name="action_edit_own_profile">संपादित करें</string>
@ -257,7 +257,7 @@
<string name="load_more_placeholder_text">और लोड करें</string>
<string name="pref_title_show_cards_in_timelines">टाइमलाइन में लिंक प्रीव्यू दिखाएं</string>
<string name="warning_scheduling_interval">मास्टोडन का न्यूनतम शेड्यूलिंग अंतराल 5 मिनट है।</string>
<string name="no_saved_status">आपके पास कोई ड्राफ्ट नहीं है।</string>
<string name="no_drafts">आपके पास कोई ड्राफ्ट नहीं है।</string>
<string name="post_lookup_error_format">%s पोस्ट खोजने में त्रुटि</string>
<string name="pref_title_enable_swipe_for_tabs">टैब के बीच स्विच करने के लिए स्वाइप जेस्चर को सक्षम करें</string>
<string name="pref_title_show_notifications_filter">सूचना फ़िल्टर दिखाएं</string>

View file

@ -99,7 +99,7 @@
<string name="action_accept">Elfogadás</string>
<string name="action_reject">Elutasítás</string>
<string name="action_search">Keresés</string>
<string name="action_access_saved_toot">Piszkozatok</string>
<string name="action_access_drafts">Piszkozatok</string>
<string name="action_toggle_visibility">Tülkök láthatósága</string>
<string name="action_content_warning">Tartalom figyelmeztetés</string>
<string name="action_emoji_keyboard">Emoji billentyűzet</string>
@ -450,7 +450,7 @@
<string name="select_list_title">Lista kiválasztása</string>
<string name="list">Lista</string>
<string name="error_audio_upload_size">A hangfájloknak kisebbnek kell lenniük, mint 40 MB.</string>
<string name="no_saved_status">Nincs egy piszkozatod sem.</string>
<string name="no_drafts">Nincs egy piszkozatod sem.</string>
<string name="no_scheduled_status">Nincs egy ütemezett tülköd sem.</string>
<string name="warning_scheduling_interval">A Mastodonban a legrövidebb ütemezhető időintervallum 5 perc.</string>
<string name="notification_follow_request_name">Követési kérelmek</string>
@ -487,9 +487,6 @@
<string name="drafts_toot_reply_removed">A Tülköt, melyre válaszul piszkozatot készítettél törölték</string>
<string name="draft_deleted">Piszkozat törölve</string>
<string name="drafts_failed_loading_reply">Nem sikerült a Válasz információit betölteni</string>
<string name="old_drafts">Régi Piszkozatok</string>
<string name="new_drafts_warning">A Tusky piszkozat funkcióját teljesen újraterveztük, hogy gyorsabb, felhasználóbarátabb és hibamentesebb legyen.
\nTovábbra is elérheted a régi piszkozataidat egy gombbal az új piszkozatok képernyőjén, de ezeket egy későbbi frissítésben el fogjuk törölni!</string>
<string name="drafts_toot_failed_to_send">Ez a tülk nem küldődött el!</string>
<string name="dialog_delete_list_warning">Tényleg le akarod törölni a %s listát\?</string>
<plurals name="error_upload_max_media_reached">

View file

@ -115,7 +115,7 @@
<string name="action_undo">Afturkalla</string>
<string name="action_accept">Samþykkja</string>
<string name="action_reject">Hafna</string>
<string name="action_access_saved_toot">Drög</string>
<string name="action_access_drafts">Drög</string>
<string name="action_access_scheduled_toot">Áætluð tíst</string>
<string name="action_toggle_visibility">Sýnileiki tísts</string>
<string name="action_content_warning">Aðvörun vegna efnis</string>
@ -416,7 +416,7 @@
<string name="poll_new_choice_hint">Valkostur %d</string>
<string name="edit_poll">Breyta</string>
<string name="post_lookup_error_format">Villa við að fletta upp færslunni %s</string>
<string name="no_saved_status">Þú ert ekki með nein drög.</string>
<string name="no_drafts">Þú ert ekki með nein drög.</string>
<string name="no_scheduled_status">Þú ert ekki með neinar áætlaðar stöðufærslur.</string>
<string name="error_audio_upload_size">Hljóðskrár verða að vera minni en 40MB.</string>
<string name="warning_scheduling_interval">Mastodon er með 5 mínútna lágmarksbil fyrir áætlaðar aðgerðir.</string>
@ -475,8 +475,6 @@
<string name="action_unmute_desc">Afþagga %s</string>
<string name="notification_follow_request_format">%s bað um að fylgjast með þér</string>
<string name="title_announcements">Tilkynningar</string>
<string name="new_drafts_warning">Gerð draga í Tusky hefur verið endurhönnuð til að verða fljótlegri, notendavænni og gallalaus.
\n Þú getur áfram nýtt eldri drög í gegnum sérstakan hnapp í glugganum fyrir drög, en sá eiginleiki verður fjarlægður í framtíðaruppfærslu!</string>
<string name="wellbeing_mode_notice">Sumar upplýsingar sem gætu haft áhrif á andlega vellíðan þína verða faldar. Þetta hefur áhrif á:
\n
\n - Eftirlæti/Endurbirtingar/Tilkynningar um fylgjendabeiðnir
@ -490,7 +488,6 @@
<string name="drafts_toot_reply_removed">Tístið sem þú gerðir drög að svari við hefur veriið fjarlægt</string>
<string name="draft_deleted">Eyddi drögum</string>
<string name="drafts_failed_loading_reply">Mistókst að hlaða inn svarupplýsingum</string>
<string name="old_drafts">Eldri drög</string>
<string name="drafts_toot_failed_to_send">Mistókst að senda þetta tíst!</string>
<string name="status_media_attachments">Viðhengi</string>
<string name="status_media_audio">Hljóð</string>

View file

@ -101,7 +101,7 @@
<string name="action_accept">Accetta</string>
<string name="action_reject">Rifiuta</string>
<string name="action_search">Cerca</string>
<string name="action_access_saved_toot">Bozze</string>
<string name="action_access_drafts">Bozze</string>
<string name="action_toggle_visibility">Visibilità dei toot</string>
<string name="action_content_warning">Avviso per il contenuto</string>
<string name="action_emoji_keyboard">Tastiera emoji</string>
@ -454,7 +454,7 @@
<string name="action_schedule_toot">Programma un toot</string>
<string name="action_reset_schedule">RIpristina</string>
<string name="poll_info_format"> <!-- 15 votes • 1 hour left --> %1$s • %2$s</string>
<string name="no_saved_status">Non hai bozze.</string>
<string name="no_drafts">Non hai bozze.</string>
<plurals name="poll_info_people">
<item quantity="one">%s persona</item>
<item quantity="other">%s persone</item>

View file

@ -98,7 +98,7 @@
<string name="action_accept">許可</string>
<string name="action_reject">拒否</string>
<string name="action_search">検索</string>
<string name="action_access_saved_toot">下書き</string>
<string name="action_access_drafts">下書き</string>
<string name="action_toggle_visibility">トゥートの公開範囲</string>
<string name="action_content_warning">注意書き</string>
<string name="action_emoji_keyboard">絵文字キーボード</string>
@ -411,7 +411,7 @@
<string name="notification_follow_request_format">%sさんがあなたにフォローリクエストしました</string>
<string name="report_sent_success">\@%sさんを通報しました</string>
<string name="no_scheduled_status">予約した投稿はありません。</string>
<string name="no_saved_status">下書きはありません。</string>
<string name="no_drafts">下書きはありません。</string>
<string name="poll_new_choice_hint">項目 %d</string>
<string name="report_description_remote_instance">このアカウントは外部のサーバーにあります。匿名化された通報の複製をそちらにも送信しますか?</string>
<string name="report_description_1">通報をサーバーのモデレーターに送信します。以下にこのアカウントを通報理由を入力できます:</string>

View file

@ -40,14 +40,14 @@
<string name="action_open_in_web">Ldi deg uminig</string>
<string name="action_share">Bḍu</string>
<string name="action_mute">Sgugem</string>
<string name="action_access_saved_toot">Irewwayen</string>
<string name="action_access_drafts">Irewwayen</string>
<string name="action_open_faved_by">Sken-d ismenyifen</string>
<string name="notification_favourite_name">Ismenyifen</string>
<plurals name="favs">
<item quantity="one"><b>%1$s</b> n usmenyaf</item>
<item quantity="other"><b>%1$s</b> n ismenyifen</item>
</plurals>
<string name="no_saved_status">Ur tesɛiḍ ara irewwayen.</string>
<string name="no_drafts">Ur tesɛiḍ ara irewwayen.</string>
<string name="error_generic">Tella-d tucḍa.</string>
<string name="title_notifications">Tilɣa</string>
<string name="link_whats_an_instance">D acu i ttummant\?</string>

View file

@ -105,7 +105,7 @@
<string name="action_accept">수락</string>
<string name="action_reject">거절</string>
<string name="action_search">검색</string>
<string name="action_access_saved_toot">임시 저장</string>
<string name="action_access_drafts">임시 저장</string>
<string name="action_toggle_visibility">공개 범위</string>
<string name="action_content_warning">열람 주의</string>
<string name="action_emoji_keyboard">이모지 추가</string>

View file

@ -106,7 +106,7 @@
<string name="notification_follow_request_name">പിന്തുടാനുള്ള അപേക്ഷകൾ</string>
<string name="pref_title_show_boosts">ബൂട്ട്‌സ് കാണിക്കുക</string>
<string name="action_access_scheduled_toot">മുന്‍നിശ്ചയിച്ച ടൂറ്റ്‌സ്</string>
<string name="action_access_saved_toot">കരടുകൾ</string>
<string name="action_access_drafts">കരടുകൾ</string>
<string name="action_edit_own_profile">തിരുത്ത്</string>
<string name="pref_title_edit_notification_settings">അറിയിപ്പുകൾ</string>
<string name="pref_title_status_tabs">ടാബുകൾ</string>

View file

@ -101,7 +101,7 @@
<string name="action_accept">Goedkeuren</string>
<string name="action_reject">Afwijzen</string>
<string name="action_search">Zoeken</string>
<string name="action_access_saved_toot">Concepten</string>
<string name="action_access_drafts">Concepten</string>
<string name="action_toggle_visibility">Zichtbaarheid toot</string>
<string name="action_content_warning">Tekstwaarschuwing</string>
<string name="action_emoji_keyboard">Emojis</string>
@ -456,8 +456,8 @@
<string name="failed_search">Zoeken mislukt</string>
<string name="create_poll_title">Poll</string>
<string name="post_lookup_error_format">Fout tijdens opzoeken toot %s</string>
<string name="no_saved_status">Je hebt nog geen concepten.</string>
<string name="no_scheduled_status">Je hebt nog geen ingeplande toots.</string>
<string name="no_drafts">Je hebt nog geen concepten</string>
<string name="no_scheduled_status">Je hebt nog geen ingeplande toots</string>
<string name="warning_scheduling_interval">Om in te plannen moet je in Mastodon een minimum interval van 5 minuten gebruiken.</string>
<string name="notification_follow_request_name">Volgverzoeken</string>
<string name="hashtags">Hashtags</string>

View file

@ -101,7 +101,7 @@
<string name="action_accept">Aksepter</string>
<string name="action_reject">Avvis</string>
<string name="action_search">Søk</string>
<string name="action_access_saved_toot">Kladder</string>
<string name="action_access_drafts">Kladder</string>
<string name="action_toggle_visibility">Toot-synlighet</string>
<string name="action_content_warning">Innholdsadvarsel</string>
<string name="action_emoji_keyboard">Emoji-tastatur</string>
@ -441,7 +441,7 @@
<string name="select_list_title">Velg liste</string>
<string name="list">Liste</string>
<string name="no_scheduled_status">Du har ingen planlagte statuser.</string>
<string name="no_saved_status">Du har ikke lagret noen kladder.</string>
<string name="no_drafts">Du har ikke lagret noen kladder.</string>
<string name="error_audio_upload_size">Lydfiler må være mindre enn 40MB.</string>
<string name="warning_scheduling_interval">Mastodon har et minimums planleggingsinterval på 5 minutter.</string>
<string name="pref_title_show_cards_in_timelines">Vis forhåndsvisning av linker i tidslinjer</string>
@ -503,9 +503,6 @@
<string name="drafts_toot_reply_removed">Tootet du kladdet et svar til har blitt fjernet</string>
<string name="draft_deleted">Kladd slettet</string>
<string name="drafts_failed_loading_reply">Lasting av svarinformasjon feilet</string>
<string name="old_drafts">Gamle kladder</string>
<string name="new_drafts_warning">KladdfunksjonaLiteten i Tusky er skrevet om og er nå kjappere, mer brukervennlig, og med færre feil.
\nGamle kladder er fortsatt tilgjengelige via en knapp på den nye kladdskjermen, men de vil bli fjernet i en fremtidig oppdatering!</string>
<string name="drafts_toot_failed_to_send">Sending av toot feilet!</string>
<string name="pref_title_animate_custom_emojis">Animer egendefinerte emojis</string>
<string name="action_unsubscribe_account">Avslutt abonnementet</string>

View file

@ -91,7 +91,7 @@
<string name="action_accept">Acceptar</string>
<string name="action_reject">Regetar</string>
<string name="action_search">Cercar</string>
<string name="action_access_saved_toot">Borrolhons</string>
<string name="action_access_drafts">Borrolhons</string>
<string name="action_toggle_visibility">Visibilitat del tut</string>
<string name="action_content_warning">Avis de contengut</string>
<string name="action_emoji_keyboard">Clavièr Emoji</string>
@ -450,7 +450,7 @@
<string name="select_list_title">Seleccionar la list</string>
<string name="list">Lista</string>
<string name="error_audio_upload_size">Los fichièrs àudio devon èsser inferiors a 40 Mo.</string>
<string name="no_saved_status">Avètz pas cap de borrolhon.</string>
<string name="no_drafts">Avètz pas cap de borrolhon.</string>
<string name="no_scheduled_status">Avètz pas cap de tut planificat.</string>
<string name="warning_scheduling_interval">Linterval minimum de planificacion sus Mastodon e de 5 minutas.</string>
<string name="notification_follow_request_name">Demandas dabonament</string>

View file

@ -89,7 +89,7 @@
<string name="action_accept">Akceptuj</string>
<string name="action_reject">Odrzuć</string>
<string name="action_search">Szukaj</string>
<string name="action_access_saved_toot">Szkice</string>
<string name="action_access_drafts">Szkice</string>
<string name="action_toggle_visibility">Widoczność wpisu</string>
<string name="action_content_warning">Ostrzeżenie o zawartości</string>
<string name="action_emoji_keyboard">Klawiatura emoji</string>
@ -461,7 +461,7 @@
<string name="select_list_title">Wybierz listę</string>
<string name="list">Lista</string>
<string name="error_audio_upload_size">Pliki audio muszą być mniejsze niż 40MB.</string>
<string name="no_saved_status">Nie masz żadnych szkiców.</string>
<string name="no_drafts">Nie masz żadnych szkiców.</string>
<string name="no_scheduled_status">Nie masz żadnych zaplanowanych wpisów.</string>
<string name="warning_scheduling_interval">Mastodon umożliwia wysłanie minimalnie 5 minut od zaplanowania.</string>
<string name="notification_follow_request_name">Prośby o możliwość śledzenia</string>

View file

@ -94,7 +94,7 @@
<string name="action_accept">Aceitar</string>
<string name="action_reject">Rejeitar</string>
<string name="action_search">Pesquisar</string>
<string name="action_access_saved_toot">Rascunhos</string>
<string name="action_access_drafts">Rascunhos</string>
<string name="action_toggle_visibility">Privacidade do toot</string>
<string name="action_content_warning">Aviso de Conteúdo</string>
<string name="action_emoji_keyboard">Teclado de emojis</string>
@ -449,7 +449,7 @@
<string name="list">Lista</string>
<string name="no_scheduled_status">Sem toots agendados.</string>
<string name="error_audio_upload_size">O áudio deve ser menor que 40MB.</string>
<string name="no_saved_status">Sem rascunhos.</string>
<string name="no_drafts">Sem rascunhos.</string>
<string name="warning_scheduling_interval">Mastodon possui um intervalo mínimo de 5 minutos para agendar.</string>
<string name="notification_follow_request_name">Seguidores pendentes</string>
<string name="notification_follow_request_format">%s quer te seguir</string>
@ -484,9 +484,6 @@
<string name="drafts_toot_failed_to_send">Erro ao enviar o toot!</string>
<string name="drafts_toot_reply_removed">O toot em que se rascunhou uma resposta foi excluído</string>
<string name="draft_deleted">Rascunho excluído</string>
<string name="new_drafts_warning">A função de rascunhos no Tusky foi totalmente redesenhada para ser mais rápida, mais fácil e com menos erros.
\nÉ possível acessar rascunhos antigos através de um botão na tela de novos rascunhos, mas serão removidos numa futura atualização!</string>
<string name="old_drafts">Rascunhos antigos</string>
<plurals name="error_upload_max_media_reached">
<item quantity="other">Não é possível anexar mais de %1$d arquivos de mídia.</item>
</plurals>

View file

@ -102,7 +102,7 @@
<string name="action_accept">Принять</string>
<string name="action_reject">Отклонить</string>
<string name="action_search">Поиск</string>
<string name="action_access_saved_toot">Черновики</string>
<string name="action_access_drafts">Черновики</string>
<string name="action_toggle_visibility">Видимость поста</string>
<string name="action_content_warning">Предупреждение о контенте</string>
<string name="action_emoji_keyboard">Эмодзи-клавиатура</string>
@ -483,8 +483,8 @@
<string name="list">Список</string>
<string name="error_audio_upload_size">Аудиофайлы должны быть меньше 40МБ.</string>
<string name="post_lookup_error_format">Ошибка поиска поста %s</string>
<string name="no_saved_status">У вас нет черновиков.</string>
<string name="no_scheduled_status">У вас нет запланированных постов.</string>
<string name="no_drafts">У вас нет черновиков.</string>
<string name="no_scheduled_status">У вас нет запланированный постов.</string>
<string name="warning_scheduling_interval">Минимальный интервал планирования в Mastodon составляет 5 минут.</string>
<string name="pref_title_confirm_reblogs">Показывать диалог подтверждения перед продвижением</string>
<string name="pref_title_show_cards_in_timelines">Показывать предпросмотр ссылок в лентах</string>

View file

@ -131,7 +131,7 @@
<string name="action_content_warning">विषयप्रत्यादेशः</string>
<string name="action_toggle_visibility">दौत्यसुदर्शता</string>
<string name="action_access_scheduled_toot">कालबद्धदौत्यानि</string>
<string name="action_access_saved_toot">लेखविकर्षाः</string>
<string name="action_access_drafts">लेखविकर्षाः</string>
<string name="action_search">अन्विष्यताम्</string>
<string name="action_reject">अस्वीक्रियताम्</string>
<string name="action_accept">स्वीक्रियताम्</string>
@ -366,7 +366,7 @@
<string name="unreblog_private">प्रकाशनंं नश्यताम्</string>
<string name="reblog_private">मूलदर्शकेभ्यः प्रकाश्यताम्</string>
<string name="account_moved_description">%1$s मित्रमत्र प्रस्थितम्:</string>
<string name="no_saved_status">न लेखविकर्षास्ते सन्ति ।</string>
<string name="no_drafts">न लेखविकर्षास्ते सन्ति ।</string>
<string name="conversation_1_recipients">%1$s</string>
<string name="pref_title_hide_top_toolbar">उच्चैःस्थितायाः साधनशालकायाः शीर्षकं छाद्यताम्</string>
<string name="pref_title_confirm_reblogs">प्रकाशनात् प्राक् पुष्टिसंवादमञ्जूषा दर्शनीया</string>

View file

@ -124,7 +124,7 @@
<string name="notification_summary_small">%1$s a %2$s</string>
<string name="edit_poll">Upraviť</string>
<string name="hashtags">Hashtagy</string>
<string name="action_access_saved_toot">Koncepty</string>
<string name="action_access_drafts">Koncepty</string>
<string name="action_edit_own_profile">Upraviť</string>
<string name="pref_title_notifications_enabled">Oznámenia</string>
<string name="pref_title_edit_notification_settings">Oznámenia</string>

View file

@ -96,7 +96,7 @@
<string name="action_accept">Sprejmi</string>
<string name="action_reject">Zavrni</string>
<string name="action_search">Iskanje</string>
<string name="action_access_saved_toot">Osnutki</string>
<string name="action_access_drafts">Osnutki</string>
<string name="action_toggle_visibility">Vidljivost tuta</string>
<string name="action_content_warning">Opozorilo o vsebini</string>
<string name="action_emoji_keyboard">Tipkovnica z emotikoni</string>

View file

@ -101,7 +101,7 @@
<string name="action_accept">Acceptera</string>
<string name="action_reject">Avvisa</string>
<string name="action_search">Sök</string>
<string name="action_access_saved_toot">Utkast</string>
<string name="action_access_drafts">Utkast</string>
<string name="action_toggle_visibility">Toot synlighet</string>
<string name="action_content_warning">Innehållsvarning</string>
<string name="action_emoji_keyboard">Emoji-tangentbord</string>
@ -457,7 +457,7 @@
<string name="list">Lista</string>
<string name="no_scheduled_status">Du har inga schemalagda statusar.</string>
<string name="error_audio_upload_size">Ljudfiler måste vara mindre än 40MB.</string>
<string name="no_saved_status">Du har inga utkast.</string>
<string name="no_drafts">Du har inga utkast.</string>
<string name="warning_scheduling_interval">Mastodon har ett minimalt schemaläggningsintervall på 5 minuter.</string>
<string name="action_mute_conversation">Tysta konversation</string>
<string name="pref_title_confirm_reblogs">Visa bekräftelse innan knuff</string>

View file

@ -84,7 +84,7 @@
<string name="action_accept">ஏற்கவும்</string>
<string name="action_reject">நிராகரி</string>
<string name="action_search">தேடு</string>
<string name="action_access_saved_toot">வரைவுகள்</string>
<string name="action_access_drafts">வரைவுகள்</string>
<string name="action_toggle_visibility">Toot புலப்படும் தன்மை</string>
<string name="action_content_warning">உள்ளடக்க எச்சரிக்கை</string>
<string name="action_emoji_keyboard">Emoji விசைபலகை</string>

View file

@ -321,7 +321,7 @@
<string name="action_content_warning">เตือนเนื้อหา</string>
<string name="action_toggle_visibility">การมองเห็น Toot</string>
<string name="action_access_scheduled_toot">Toot แบบตั้งเวลา</string>
<string name="action_access_saved_toot">ฉบับร่าง</string>
<string name="action_access_drafts">ฉบับร่าง</string>
<string name="action_reject">ปฏิเสธ</string>
<string name="action_accept">ยอมรับ</string>
<string name="action_undo">ยกเลิก</string>
@ -447,7 +447,7 @@
<string name="pref_title_show_cards_in_timelines">แสดงตัวอย่างลิงก์ในไทม์ไลน์</string>
<string name="warning_scheduling_interval">Mastodon กำหนดเวลาขั้นต่ำ 5 นาที</string>
<string name="no_scheduled_status">ไม่มีสถานะแบบตั้งเวลาใด ๆ</string>
<string name="no_saved_status">ไม่มีฉบับร่างใด ๆ</string>
<string name="no_drafts">ไม่มีฉบับร่างใด ๆ</string>
<string name="post_lookup_error_format">การค้นหาโพสต์ %s เกิดข้อผิดผลาด</string>
<string name="edit_poll">แก้ไข</string>
<string name="poll_new_choice_hint">ตัวเลือกที่ %d</string>
@ -472,8 +472,6 @@
<string name="limit_notifications">แจ้งเตือน Limit timeline</string>
<string name="review_notifications">แจ้งเตือน Review</string>
<string name="pref_title_notification_filter_subscriptions">ใครบางคนที่ฉันได้ติดตาม ได้เผยแพร่โพสต์ใหม่</string>
<string name="new_drafts_warning">ฟีเจอร์ฉบับร่างใน Tusky ได้รับการออกแบบใหม่ทั้งหมดเพื่อให้เร็วขึ้นเป็นมิตรกับผู้ใช้มากขึ้นและบั๊กน้อยลง
\n คุณยังสามารถเข้าถึงฉบับร่างเก่าผ่านปุ่มในหน้าฉบับร่างใหม่ แต่จะถูกลบออกในการอัปเดตในอนาคต!</string>
<string name="wellbeing_hide_stats_profile">ซ่อนสถิติเชิงปริมาณในโปรไฟล์</string>
<string name="wellbeing_hide_stats_posts">ซ่อนสถิติเชิงปริมาณของโพสต์</string>
<string name="pref_title_wellbeing_mode">สุขภาวะ</string>
@ -482,7 +480,6 @@
<string name="drafts_toot_reply_removed">โพสต์ที่คุณได้ร่างตอบไว้ ถูกลบแลัว</string>
<string name="draft_deleted">ลบฉบับร่างแล้ว</string>
<string name="drafts_failed_loading_reply">ล้มเหลวในการโหลดข้อมูลตอบกลับ</string>
<string name="old_drafts">ฉบับร่างเก่า</string>
<string name="dialog_delete_list_warning">คุณต้องการลบลิสต์ %s ใช่ไหม\?</string>
<plurals name="error_upload_max_media_reached">
<item quantity="other">คุณไม่สามารถอัปโหลดไฟล์แนบมากกว่า %1$d ได้</item>

View file

@ -99,7 +99,7 @@
<string name="action_accept">Kabul et</string>
<string name="action_reject">Reddet</string>
<string name="action_search">Ara</string>
<string name="action_access_saved_toot">Taslaklar</string>
<string name="action_access_drafts">Taslaklar</string>
<string name="action_toggle_visibility">Toot görünürlüğü</string>
<string name="action_content_warning">İçerik uyarı</string>
<string name="action_emoji_keyboard">İfade klavyesi</string>
@ -443,7 +443,7 @@
<string name="failed_report">Bildirilemedi</string>
<string name="poll_new_choice_hint">Seçenek %d</string>
<string name="post_lookup_error_format">%s gönderisi aranırken hata oluştu</string>
<string name="no_saved_status">Hiç taslağınız yok.</string>
<string name="no_drafts">Hiç taslağınız yok.</string>
<string name="no_scheduled_status">Zamanlanmış durumunuz yok.</string>
<string name="reblog_private">Kendi kitlenize yükseltin</string>
<string name="hashtags">Hashtags\'ler</string>

View file

@ -58,7 +58,7 @@
<string name="action_links">Посилання</string>
<string name="action_content_warning">Попередження про вміст</string>
<string name="action_access_scheduled_toot">Заплановані дмухи</string>
<string name="action_access_saved_toot">Чернетки</string>
<string name="action_access_drafts">Чернетки</string>
<string name="action_reject">Відхилити</string>
<string name="action_accept">Прийняти</string>
<string name="action_undo">Скасувати</string>
@ -458,9 +458,6 @@
<string name="drafts_toot_reply_removed">Дмух, для якого ви створили чернетку відповіді, вилучено</string>
<string name="draft_deleted">Чернетку видалено</string>
<string name="drafts_failed_loading_reply">Не вдалося завантажити дані відповіді</string>
<string name="old_drafts">Старі чернетки</string>
<string name="new_drafts_warning">Функція чернетки в Tusky була повністю перероблена, щоб бути швидшою, зручнішою для користувачів і з меншою кількістю вад.
\n Ви все ще можете отримати доступ до своїх старих чернеток за допомогою кнопки на екрані нових чернеток, але вони будуть вилучені в майбутньому оновленні!</string>
<string name="drafts_toot_failed_to_send">Не вдалося надіслати цей дмух!</string>
<string name="dialog_delete_list_warning">Ви дійсно хочете видалити список %s\?</string>
<plurals name="error_upload_max_media_reached">
@ -481,7 +478,7 @@
<string name="warning_scheduling_interval">Найкоротший час планування Mastodon становить 5 хвилин.</string>
<string name="no_announcements">Оголошень немає.</string>
<string name="no_scheduled_status">Черга статусів порожня.</string>
<string name="no_saved_status">У вас немає чернеток.</string>
<string name="no_drafts">У вас немає чернеток.</string>
<string name="post_lookup_error_format">Помилка пошуку допису %s</string>
<string name="pref_title_enable_swipe_for_tabs">Увімкнути перемикання між вкладками жестом проведення пальцем</string>
<string name="pref_title_show_notifications_filter">Показати фільтр сповіщень</string>

View file

@ -117,7 +117,7 @@
<string name="action_content_warning">Nội dung nhạy cảm</string>
<string name="action_toggle_visibility">Công khai</string>
<string name="action_access_scheduled_toot">Tút đã lên lịch</string>
<string name="action_access_saved_toot">Nháp</string>
<string name="action_access_drafts">Nháp</string>
<string name="action_reject">Từ chối</string>
<string name="action_accept">Đồng ý</string>
<string name="action_undo">Trở về</string>
@ -315,7 +315,7 @@
<string name="pref_title_show_cards_in_timelines">Hiện xem trước của link</string>
<string name="warning_scheduling_interval">Mastodon giới hạn tối thiểu 5 phút.</string>
<string name="no_scheduled_status">Bạn không có tút đã lên lịch.</string>
<string name="no_saved_status">Bạn không có bản nháp nào.</string>
<string name="no_drafts">Bạn không có bản nháp nào.</string>
<string name="edit_poll">Sửa</string>
<string name="poll_new_choice_hint">Lựa chọn %d</string>
<string name="poll_allow_multiple_choices">Cho phép chọn nhiều lựa chọn</string>
@ -490,11 +490,8 @@
<string name="status_media_attachments">Đính kèm</string>
<string name="status_media_audio">Âm thanh</string>
<string name="drafts_toot_reply_removed">Tút bạn lên lịch đã bị hủy bỏ</string>
<string name="old_drafts">Tút lên lịch cũ</string>
<string name="draft_deleted">Tút lên lịch đã xóa</string>
<string name="drafts_failed_loading_reply">Chưa tải được bình luận</string>
<string name="new_drafts_warning">Tính năng lên lịch đăng tút của Tusky được thiết kế lại hoàn toàn để nhanh hơn, thân thiện hơn và ít lỗi hơn.
\nBạn vẫn có thể xem lại bản nháp cũ nhưng chúng sẽ bị xóa bỏ trong bản cập nhật tương lai!</string>
<string name="drafts_toot_failed_to_send">Đăng tút không thành công!</string>
<string name="pref_title_animate_custom_emojis">Emoji động</string>
<string name="action_unsubscribe_account">Ngưng nhận thông báo</string>

View file

@ -102,7 +102,7 @@
<string name="action_accept">接受</string>
<string name="action_reject">拒绝</string>
<string name="action_search">搜索</string>
<string name="action_access_saved_toot">草稿</string>
<string name="action_access_drafts">草稿</string>
<string name="action_toggle_visibility">设置嘟文可见范围</string>
<string name="action_content_warning">设置内容提醒</string>
<string name="action_emoji_keyboard">插入表情符号</string>
@ -454,7 +454,7 @@
<string name="poll_new_choice_hint">选择 %d</string>
<string name="edit_poll">编辑</string>
<string name="post_lookup_error_format">查找嘟文时出错 %s</string>
<string name="no_saved_status">您没有草稿。</string>
<string name="no_drafts">您没有草稿。</string>
<string name="no_scheduled_status">您没有任何定时嘟文。</string>
<string name="warning_scheduling_interval">Mastodon的最小预订时间为5分钟。</string>
<string name="notification_follow_request_name">关注请求</string>
@ -492,9 +492,6 @@
<string name="drafts_toot_reply_removed">该草稿回复的原嘟文已被删除</string>
<string name="draft_deleted">草稿已删除</string>
<string name="drafts_failed_loading_reply">加载回复信息失败</string>
<string name="old_drafts">旧草稿</string>
<string name="new_drafts_warning">Tusky 的草稿功能已被重新设计现在它更快、更友好Bug也更少。
\n 旧草稿依然可以通过新草稿页面的按钮查看,但他们将在未来版本中移除!</string>
<string name="drafts_toot_failed_to_send">嘟文发送失败!</string>
<string name="dialog_delete_list_warning">确认删除列表 %s</string>
<plurals name="error_upload_max_media_reached">

View file

@ -102,7 +102,7 @@
<string name="action_accept">接受</string>
<string name="action_reject">拒絕</string>
<string name="action_search">搜尋</string>
<string name="action_access_saved_toot">草稿</string>
<string name="action_access_drafts">草稿</string>
<string name="action_toggle_visibility">設定嘟文可見範圍</string>
<string name="action_content_warning">設定敏感內容警告</string>
<string name="action_emoji_keyboard">插入表情符號</string>
@ -451,7 +451,6 @@
<string name="drafts_toot_reply_removed">你的草稿欲回覆的原嘟文已被刪除</string>
<string name="draft_deleted">草稿已刪除</string>
<string name="drafts_failed_loading_reply">載入回覆資訊失敗</string>
<string name="old_drafts">舊的草稿</string>
<string name="drafts_toot_failed_to_send">這條嘟文發送失敗!</string>
<string name="dialog_delete_list_warning">你確定要刪除列表 %s</string>
<plurals name="error_upload_max_media_reached">
@ -465,7 +464,7 @@
<string name="warning_scheduling_interval">Mastodon 的最短發文間隔限制為 5 分鐘。</string>
<string name="no_announcements">沒有公告。</string>
<string name="no_scheduled_status">你沒有任何已排程的嘟文。</string>
<string name="no_saved_status">你沒有任何草稿。</string>
<string name="no_drafts">你沒有任何草稿。</string>
<string name="post_lookup_error_format">尋找嘟文時發生錯誤 %s</string>
<string name="poll_new_choice_hint">選項 %d</string>
<string name="poll_allow_multiple_choices">多個選項</string>

View file

@ -102,7 +102,7 @@
<string name="action_accept">接受</string>
<string name="action_reject">拒絕</string>
<string name="action_search">搜尋</string>
<string name="action_access_saved_toot">草稿</string>
<string name="action_access_drafts">草稿</string>
<string name="action_toggle_visibility">設定嘟文可見範圍</string>
<string name="action_content_warning">敏感內容警告</string>
<string name="action_emoji_keyboard">插入表情符號</string>

View file

@ -102,7 +102,7 @@
<string name="action_accept">接受</string>
<string name="action_reject">拒绝</string>
<string name="action_search">搜索</string>
<string name="action_access_saved_toot">草稿</string>
<string name="action_access_drafts">草稿</string>
<string name="action_toggle_visibility">设置嘟文可见范围</string>
<string name="action_content_warning">设置内容提醒信息</string>
<string name="action_emoji_keyboard">插入表情符号</string>

View file

@ -102,7 +102,7 @@
<string name="action_accept">接受</string>
<string name="action_reject">拒絕</string>
<string name="action_search">搜尋</string>
<string name="action_access_saved_toot">草稿</string>
<string name="action_access_drafts">草稿</string>
<string name="action_toggle_visibility">設定嘟文可見範圍</string>
<string name="action_content_warning">敏感內容警告</string>
<string name="action_emoji_keyboard">插入表情符號</string>
@ -440,8 +440,6 @@
<string name="action_edit">編輯</string>
<string name="title_bookmarks">書籤</string>
<string name="error_audio_upload_size">音檔必需小於40MB。</string>
<string name="new_drafts_warning">Tusky 的草稿功能已重新設計,更快、更好用、更少問題。
\n 你還是可以在草稿頁面中查看你的先前的舊草稿,但它們在未來的某次更新中將會被移除!</string>
<string name="wellbeing_hide_stats_profile">隱藏個人頁面中的狀態數量資訊</string>
<string name="wellbeing_hide_stats_posts">隱藏貼文上的狀態數量資訊</string>
<string name="limit_notifications">限制時間軸通知</string>
@ -463,7 +461,6 @@
<string name="drafts_toot_reply_removed">你的草稿欲回覆的原嘟文已被刪除</string>
<string name="draft_deleted">草稿已刪除</string>
<string name="drafts_failed_loading_reply">載入回覆資訊失敗</string>
<string name="old_drafts">舊的草稿</string>
<string name="drafts_toot_failed_to_send">這條嘟文發送失敗!</string>
<string name="status_media_attachments">附件</string>
<string name="status_media_audio">錄音</string>
@ -508,7 +505,7 @@
<string name="action_unmute_conversation">取消靜音對話</string>
<string name="action_mute_conversation">靜音對話</string>
<string name="warning_scheduling_interval">Mastodon 的最短發文間隔限制為 5 分鐘。</string>
<string name="no_saved_status">你沒有任何草稿。</string>
<string name="no_drafts">你沒有任何草稿。</string>
<string name="no_scheduled_status">你沒有任何已排程的嘟文。</string>
<string name="list">列表</string>
<string name="select_list_title">選擇列表</string>

View file

@ -127,7 +127,7 @@
<string name="action_accept">Accept</string>
<string name="action_reject">Reject</string>
<string name="action_search">Search</string>
<string name="action_access_saved_toot">Drafts</string>
<string name="action_access_drafts">Drafts</string>
<string name="action_access_scheduled_toot">Scheduled toots</string>
<string name="action_toggle_visibility">Toot visibility</string>
<string name="action_content_warning">Content warning</string>
@ -583,7 +583,7 @@
<string name="edit_poll">Edit</string>
<string name="post_lookup_error_format">Error looking up post %s</string>
<string name="no_saved_status">You don\'t have any drafts.</string>
<string name="no_drafts">You don\'t have any drafts.</string>
<string name="no_scheduled_status">You don\'t have any scheduled statuses.</string>
<string name="no_announcements">There are no announcements.</string>
<string name="warning_scheduling_interval">Mastodon has a minimum scheduling interval of 5 minutes.</string>
@ -611,13 +611,6 @@
<string name="dialog_delete_list_warning">Do you really want to delete the list %s?</string>
<string name="drafts_toot_failed_to_send">This toot failed to send!</string>
<string name="new_drafts_warning">
The draft feature in Tusky has been completely redesigned to be faster, more user friendly and less buggy.\n
You can still access your old drafts via a button on the new drafts screen,
but they will be removed in a future update!
</string>
<string name="old_drafts">Old Drafts</string>
<string name="drafts_failed_loading_reply">Failed loading Reply information</string>
<string name="draft_deleted">Draft deleted</string>
<string name="drafts_toot_reply_removed">The Toot you drafted a reply to has been removed</string>

View file

@ -31,7 +31,6 @@ import com.keylesspalace.tusky.entity.Account
import com.keylesspalace.tusky.entity.Instance
import com.keylesspalace.tusky.network.MastodonApi
import com.keylesspalace.tusky.service.ServiceClient
import com.keylesspalace.tusky.util.SaveTootHelper
import com.nhaarman.mockitokotlin2.any
import io.reactivex.Single
import io.reactivex.SingleObserver
@ -116,7 +115,6 @@ class ComposeActivityTest {
mock(MediaUploader::class.java),
mock(ServiceClient::class.java),
mock(DraftHelper::class.java),
mock(SaveTootHelper::class.java),
dbMock
)
activity.intent = Intent(activity, ComposeActivity::class.java).apply {