From 48bf3fe35ae85cc38dcae2ee428c7162b391d857 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 11 Jan 2020 12:41:44 +0300 Subject: [PATCH] ProgressView: remove dead code --- .../compose/view/IProgressView.java | 21 ------------------- .../compose/view/ProgressImageView.java | 4 +--- .../compose/view/ProgressTextView.java | 4 +--- 3 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 app/src/main/java/com/keylesspalace/tusky/components/compose/view/IProgressView.java diff --git a/app/src/main/java/com/keylesspalace/tusky/components/compose/view/IProgressView.java b/app/src/main/java/com/keylesspalace/tusky/components/compose/view/IProgressView.java deleted file mode 100644 index 0fdae730..00000000 --- a/app/src/main/java/com/keylesspalace/tusky/components/compose/view/IProgressView.java +++ /dev/null @@ -1,21 +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 . */ - -package com.keylesspalace.tusky.components.compose.view; - -public interface IProgressView { - public void setProgress(int progress); - public void setChecked(boolean checked); -} diff --git a/app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressImageView.java b/app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressImageView.java index b8f22da7..836d81bd 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressImageView.java +++ b/app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressImageView.java @@ -32,7 +32,7 @@ import android.util.AttributeSet; import com.keylesspalace.tusky.R; import at.connyduck.sparkbutton.helpers.Utils; -public final class ProgressImageView extends AppCompatImageView implements IProgressView { +public final class ProgressImageView extends AppCompatImageView { private int progress = -1; private final RectF progressRect = new RectF(); @@ -70,7 +70,6 @@ public final class ProgressImageView extends AppCompatImageView implements IProg captionDrawable = AppCompatResources.getDrawable(getContext(), R.drawable.spellcheck); } - @Override public void setProgress(int progress) { this.progress = progress; if (progress != -1) { @@ -81,7 +80,6 @@ public final class ProgressImageView extends AppCompatImageView implements IProg invalidate(); } - @Override public void setChecked(boolean checked) { this.markBgPaint.setColor(ContextCompat.getColor(getContext(), checked ? R.color.tusky_blue : R.color.description_marker_unselected)); diff --git a/app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressTextView.java b/app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressTextView.java index 331df083..3bdbb3fe 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressTextView.java +++ b/app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressTextView.java @@ -32,7 +32,7 @@ import android.util.AttributeSet; import com.keylesspalace.tusky.R; import at.connyduck.sparkbutton.helpers.Utils; -public final class ProgressTextView extends AppCompatTextView implements IProgressView { +public final class ProgressTextView extends AppCompatTextView { private int progress = -1; private final RectF progressRect = new RectF(); @@ -70,13 +70,11 @@ public final class ProgressTextView extends AppCompatTextView implements IProgre captionDrawable = AppCompatResources.getDrawable(getContext(), R.drawable.spellcheck); } - @Override public void setProgress(int progress) { this.progress = progress; invalidate(); } - @Override public void setChecked(boolean checked) { this.markBgPaint.setColor(ContextCompat.getColor(getContext(), checked ? R.color.tusky_blue : R.color.description_marker_unselected));