Handle crash on invalid version code
This commit is contained in:
parent
dd4cb02489
commit
152ccb8fa8
|
@ -124,7 +124,7 @@ public class MostVisitedReposFragment extends Fragment {
|
|||
|
||||
MenuItem searchItem = menu.findItem(R.id.action_search);
|
||||
SearchView searchView = (SearchView) searchItem.getActionView();
|
||||
searchView.setImeOptions(EditorInfo.IME_ACTION_DONE);
|
||||
Objects.requireNonNull(searchView).setImeOptions(EditorInfo.IME_ACTION_DONE);
|
||||
|
||||
searchView.setOnQueryTextListener(
|
||||
new SearchView.OnQueryTextListener() {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.mian.gitnex.helpers;
|
||||
|
||||
import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -55,7 +56,8 @@ public class Version {
|
|||
}
|
||||
|
||||
if (!valid(raw)) {
|
||||
throw new IllegalArgumentException("Invalid version format: " + raw);
|
||||
// throw new IllegalArgumentException("Invalid version format: " + raw);
|
||||
Log.e("Version", "Invalid version format: " + raw);
|
||||
}
|
||||
if (raw.equals("main")) {
|
||||
dev = true;
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen12dp"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
|
@ -226,7 +227,7 @@
|
|||
app:iconTint="?attr/materialCardBackgroundColor"
|
||||
android:backgroundTint="?attr/fabColor"
|
||||
app:icon="@drawable/ic_feedback" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
Loading…
Reference in New Issue