added message after status successfully scheduled

This commit is contained in:
Mariotaku Lee 2017-03-27 16:05:20 +08:00
parent ae9baa8df8
commit 75716798a4
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
5 changed files with 44 additions and 3 deletions

View File

@ -1 +1 @@
3056c5fccf8ed35a00e5875072d8138cf802c304
385d4ef2b282005c787a0cb2ea057d99cd36f449

View File

@ -294,7 +294,13 @@ class LengthyOperationsService : BaseIntentService("lengthy_operations") {
}
}
if (!failed) {
Toast.makeText(context, R.string.message_toast_status_updated, Toast.LENGTH_SHORT).show()
if (scheduleInfo != null) {
Toast.makeText(context, R.string.message_toast_status_scheduled,
Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(context, R.string.message_toast_status_updated,
Toast.LENGTH_SHORT).show()
}
}
}

View File

@ -93,6 +93,7 @@ class DraftViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
companion object {
const val layoutResource = R.layout.list_item_draft
const val layoutResourceClickable = R.layout.list_item_draft_clickable
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Twidere - Twitter client for Android
~
~ Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
~
~ 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.
~
~ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:orientation="vertical">
<include layout="@layout/list_item_draft"/>
</FrameLayout>

View File

@ -27,6 +27,7 @@
<string name="action_blocking">blocking</string>
<string name="action_buffer_disconnect">Disconnect from Buffer</string>
<string name="action_buffer_settings">Settings</string>
<string name="action_buffer_update_now">Update now</string>
<!-- [verb] Action for cancelling (deleting) a retweet-->
<string name="action_cancel_retweet">Cancel retweet</string>
<string name="action_cancelling_like">cancelling like</string>
@ -515,6 +516,7 @@
<string name="label_auth_type">Auth type</string>
<string name="label_background_operation_service">Background operation service</string>
<string name="label_buffer_accounts">Buffer accounts</string>
<string name="label_buffer_due_at_no_time">No time</string>
<string name="label_data_provider">Twidere database provider</string>
<string name="label_filters_subscription">Subscription</string>
<string name="label_format_buffer_time_source"><xliff:g example="12:00, April 1" id="time">%1$s</xliff:g> via <xliff:g example="api" id="source">%2$s</xliff:g></string>
@ -596,6 +598,7 @@
<string name="message_api_url_format_help">[DOMAIN]: Twitter API domain.\nExample: https://[DOMAIN].twitter.com/ will be replaced to https://api.twitter.com/.</string>
<string name="message_auto_refresh_confirm">Enable auto refresh to get new tweets automatically?</string>
<string name="message_blocked_user">Blocked <xliff:g id="user">%s</xliff:g>.</string>
<string name="message_buffer_delete_schedule_confirm">Delete this schedule?</string>
<string name="message_clear_messages_confirm">Clear all messages?</string>
<string name="message_conversation_created">Conversation created.</string>
<string name="message_destroy_conversation_confirm">Leave this conversation?</string>
@ -659,6 +662,7 @@
<string name="message_toast_retweet_cancelled">Retweet cancelled</string>
<string name="message_toast_save_media_no_storage_permission">Storage permission is needed to save media</string>
<string name="message_toast_saved_to_gallery">Saved to gallery</string>
<string name="message_toast_schedule_future_time_required">Date/time should be in future</string>
<string name="message_toast_search_deleted">Search deleted</string>
<string name="message_toast_search_name_deleted">Search \"<xliff:g example="SearchQuery" id="name">%1$s</xliff:g>\" deleted</string>
<string name="message_toast_search_name_saved">Search \"<xliff:g example="SearchQuery" id="name">%1$s</xliff:g>\" saved</string>
@ -671,6 +675,7 @@
<string name="message_toast_status_liked">Tweet liked</string>
<string name="message_toast_status_retweeted">Retweeted</string>
<string name="message_toast_status_saved_to_draft">Tweet saved to draft</string>
<string name="message_toast_status_scheduled">Tweet scheduled</string>
<string name="message_toast_status_unfavorited">Tweet unfavorited</string>
<string name="message_toast_status_updated">Tweet sent</string>
<string name="message_toast_unable_to_load_more_statuses">Unable to load earlier tweets</string>
@ -1129,6 +1134,7 @@
<string name="title_blocked_users">Blocked users</string>
<string name="title_browser_sign_in">Browser sign in</string>
<string name="title_buffer_queue_manager">Buffer queue</string>
<string name="title_buffer_schedule">Buffer schedule</string>
<string name="title_buffer_set_schedule">Schedule with Buffer</string>
<string name="title_buffer_settings">Buffer settings</string>
<string name="title_compose">Compose</string>
@ -1270,5 +1276,4 @@
<string name="users_statuses">User\'s tweets</string>
<string name="vibration">Vibration</string>
<string name="label_buffer_due_at_no_time">No time</string>
</resources>