mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
remove unused functions isManualSelection() and transportOptions.disableTransport()
This commit is contained in:
@@ -12,9 +12,6 @@ import java.util.List;
|
||||
import static org.thoughtcrime.securesms.TransportOption.Type;
|
||||
|
||||
public class TransportOptions {
|
||||
|
||||
private static final String TAG = TransportOptions.class.getSimpleName();
|
||||
|
||||
private final List<OnTransportChangedListener> listeners = new LinkedList<>();
|
||||
private final Context context;
|
||||
private final List<TransportOption> enabledTransports;
|
||||
@@ -55,10 +52,6 @@ public class TransportOptions {
|
||||
notifyTransportChangeListeners();
|
||||
}
|
||||
|
||||
public boolean isManualSelection() {
|
||||
return this.selectedOption.isPresent();
|
||||
}
|
||||
|
||||
public @NonNull TransportOption getSelectedTransport() {
|
||||
if (selectedOption.isPresent()) return selectedOption.get();
|
||||
|
||||
@@ -71,18 +64,6 @@ public class TransportOptions {
|
||||
throw new AssertionError("No options of default type!");
|
||||
}
|
||||
|
||||
public void disableTransport(Type type) {
|
||||
Optional<TransportOption> option = find(type);
|
||||
|
||||
if (option.isPresent()) {
|
||||
enabledTransports.remove(option.get());
|
||||
|
||||
if (selectedOption.isPresent() && selectedOption.get().getType() == type) {
|
||||
setSelectedTransport(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<TransportOption> getEnabledTransports() {
|
||||
return enabledTransports;
|
||||
}
|
||||
|
||||
@@ -56,10 +56,6 @@ public class SendButton extends ImageButton
|
||||
return transportOptionsPopup.get();
|
||||
}
|
||||
|
||||
public boolean isManualSelection() {
|
||||
return transportOptions.isManualSelection();
|
||||
}
|
||||
|
||||
public void addOnTransportChangedListener(OnTransportChangedListener listener) {
|
||||
transportOptions.addOnTransportChangedListener(listener);
|
||||
}
|
||||
@@ -72,10 +68,6 @@ public class SendButton extends ImageButton
|
||||
transportOptions.reset();
|
||||
}
|
||||
|
||||
public void disableTransport(TransportOption.Type type) {
|
||||
transportOptions.disableTransport(type);
|
||||
}
|
||||
|
||||
public void setDefaultTransport(TransportOption.Type type) {
|
||||
transportOptions.setDefaultTransport(type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user