fix build warnings (#1331)

This commit is contained in:
Konrad Pozniak 2019-06-24 22:15:31 +02:00 committed by GitHub
parent 56b53c458a
commit 707f3e605c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 16 additions and 20 deletions

View File

@ -2,7 +2,6 @@ package com.keylesspalace.tusky
import android.os.Bundle
import android.view.MenuItem
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.Toast
@ -61,7 +60,7 @@ class FiltersActivity: BaseActivity() {
private fun deleteFilter(itemIndex: Int) {
val filter = filters[itemIndex]
if (filter.context.count() == 1) {
if (filter.context.size == 1) {
// This is the only context for this filter; delete it
api.deleteFilter(filters[itemIndex].id).enqueue(object: Callback<ResponseBody> {
override fun onFailure(call: Call<ResponseBody>, t: Throwable) {
@ -160,7 +159,7 @@ class FiltersActivity: BaseActivity() {
filterProgressBar.hide()
filterMessageView.show()
filterMessageView.setup(R.drawable.elephant_error,
R.string.error_generic, this@FiltersActivity::reload)
R.string.error_generic) { loadFilters() }
}
}
@ -169,19 +168,15 @@ class FiltersActivity: BaseActivity() {
filterMessageView.show()
if (t is IOException) {
filterMessageView.setup(R.drawable.elephant_offline,
R.string.error_network, this@FiltersActivity::reload)
R.string.error_network) { loadFilters() }
} else {
filterMessageView.setup(R.drawable.elephant_error,
R.string.error_generic, this@FiltersActivity::reload)
R.string.error_generic) { loadFilters() }
}
}
})
}
private fun reload(v: View) {
loadFilters()
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

View File

@ -779,7 +779,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
if (poll == null) {
return "";
} else {
CharSequence[] args = new CharSequence[5];
Object[] args = new CharSequence[5];
List<PollOptionViewData> options = poll.getOptions();
for (int i = 0; i < args.length; i++) {
if (i < options.size()) {

View File

@ -438,7 +438,6 @@
<string name="compose_preview_image_description">إجراءات على الصورة %s</string>
<string name="caption_notoemoji">حزمة الإيموجي الحالية لـ غوغل</string>
<string name="description_poll">استطلاع رأي بالخيارات: %s, %s, %s, %s; %s</string>
<string name="title_domain_mutes">النطاقات المخفية</string>
<string name="action_view_domain_mutes">النطاقات المخفية</string>

View File

@ -417,7 +417,7 @@
<string name="description_visiblity_unlisted">অতালিকাভুক্ত</string>
<string name="description_visiblity_private">অনুগামিবৃন্দ</string>
<string name="description_visiblity_direct">সরাসরি</string>
<string name="description_poll">পছন্দগুলি সহ নর্বাচন: %s, %s, %s, %s; %s</string>
<string name="description_poll">পছন্দগুলি সহ নর্বাচন: %1$s, %2$s, %3$s, %4$s; %5$s</string>
<string name="hint_list_name">নামের তালিকা</string>

View File

@ -431,7 +431,7 @@
<string name="pref_title_animate_gif_avatars">Animovat avatary GIF</string>
<string name="description_poll">Anketa s volbami: %s, %s, %s, %s; %s</string>
<string name="description_poll">Anketa s volbami: %1$s, %2$s, %3$s, %4$s; %5$s</string>
<string name="title_domain_mutes">Skryté domény</string>
<string name="action_view_domain_mutes">Skryté domény</string>

View File

@ -425,7 +425,9 @@
<string name="poll_option_format"> <!-- 15% vote for this! --> &lt;b&gt;%1$d%%&lt;/b&gt; %2$s</string>
<string name="poll_ended_voted">Un sondage auquel vous avez participé vient de se terminer</string>
<string name="description_poll">Sondage avec les choix : %s, %s, %s, %s; %s</string>
<string name="description_poll">Sondage avec des choix : %1$s, %2$s, %3$s, %4$s; %5$s</string>
<string name="title_domain_mutes">Domaines cachés</string>
<string name="action_view_domain_mutes">Domaines cachés</string>

View File

@ -462,7 +462,7 @@
<string name="pref_title_animate_gif_avatars">Animer GIF-avatarer</string>
<string name="description_poll">Avstemming med valg: %s, %s, %s, %s; %s</string>
<string name="description_poll">Avstemming med valg: %1$s, %2$s, %3$s, %4$s; %5$s</string>
<string name="caption_notoemoji">Googles nåværende emoji-samling</string>
<string name="button_continue">Fortsett</string>

View File

@ -433,7 +433,7 @@
<string name="pref_title_animate_gif_avatars">Activar lanimacion dels avatars</string>
<string name="caption_notoemoji">Jòc demoji actuals de Google</string>
<string name="description_poll">Sondatge amb opcion: %s, %s, %s, %s; %s</string>
<string name="description_poll">Sondatge amb opcion: %1$s, %2$s, %3$s, %4$s; %5$s</string>
<string name="button_continue">Contunhar</string>
<string name="button_back">Tornar</string>

View File

@ -427,7 +427,7 @@
<string name="pref_title_animate_gif_avatars">Reproduzir GIFs</string>
<string name="description_poll">Enquete com as opções: %s, %s, %s, %s; %s</string>
<string name="description_poll">Enquete com as opções: %1$s, %2$s, %3$s, %4$s; %5$s</string>
<string name="caption_notoemoji">Pacote de emojis atual do Google</string>
<string name="button_continue">Continuar</string>

View File

@ -476,7 +476,7 @@
<string name="pref_title_animate_gif_avatars">Animirane podobe GIF</string>
<string name="description_poll">Anketa z izbiro: %s, %s, %s, %s; %s</string>
<string name="description_poll">Anketa z izbiro: %1$s, %2$s, %3$s, %4$s; %5$s</string>
<string name="caption_notoemoji">Googlovi trenutni emotikoni</string>
<string name="button_continue">Nadaljuj</string>

View File

@ -423,7 +423,7 @@
<string name="pref_title_animate_gif_avatars">Animera profil gifar</string>
<string name="description_poll">Undersökning med valen: %s, %s, %s, %s; %s</string>
<string name="description_poll">Undersökning med valen: %1$s, %2$s, %3$s, %4$s; %5$s</string>
<string name="title_domain_mutes">Dolda domäner</string>
<string name="action_view_domain_mutes">Dolda domäner</string>

View File

@ -450,7 +450,7 @@
Direct
</string>
<string name="description_poll">
Poll with choices: %s, %s, %s, %s; %s
Poll with choices: %1$s, %2$s, %3$s, %4$s; %5$s
</string>
<string name="hint_list_name">List name</string>