Removed reload button in main ActionBar menu, fixed bug with loading screen when creating new chat

This commit is contained in:
ChronosX88 2019-05-23 00:02:25 +04:00
parent e68d41ffb7
commit a4bd3357f2
3 changed files with 1 additions and 39 deletions

View File

@ -60,7 +60,6 @@ public class MainActivity extends AppCompatActivity implements CoreContracts.IMa
fab.setOnClickListener((v) -> {
Pair<AlertDialog.Builder, EditText> pair = ViewUtils.INSTANCE.setupEditTextDialog(MainActivity.this, getString(R.string.input_companion_username));
pair.getFirst().setPositiveButton(getString(R.string.ok), (dialog, which) -> {
showProgressBar(true);
presenter.startChatWithPeer(pair.getSecond().getText().toString());
});
pair.getFirst().setNegativeButton(getString(R.string.cancel), (dialog, which) -> {
@ -88,15 +87,6 @@ public class MainActivity extends AppCompatActivity implements CoreContracts.IMa
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if(item.getItemId() == R.id.action_reconnect_network) {
progressDialog.show();
presenter.initConnection();
}
return true;
}
@Override
public void showSnackbar(@NotNull String message) {
runOnUiThread(() -> Snackbar.make(getRootView(), message, Snackbar.LENGTH_LONG).show());

View File

@ -1,22 +0,0 @@
<!--
~ Copyright (C) 2019 ChronosX88
~
~ 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 <https://www.gnu.org/licenses/>.
-->
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M12,6v3l4,-4 -4,-4v3c-4.42,0 -8,3.58 -8,8 0,1.57 0.46,3.03 1.24,4.26L6.7,14.8c-0.45,-0.83 -0.7,-1.79 -0.7,-2.8 0,-3.31 2.69,-6 6,-6zM18.76,7.74L17.3,9.2c0.44,0.84 0.7,1.79 0.7,2.8 0,3.31 -2.69,6 -6,6v-3l-4,4 4,4v-3c4.42,0 8,-3.58 8,-8 0,-1.57 -0.46,-3.03 -1.24,-4.26z"/>
</vector>

View File

@ -16,11 +16,5 @@
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_reconnect_network"
app:showAsAction="always"
android:icon="@drawable/ic_autorenew_white_24dp"
android:title="@string/reconnect_network"/>
<menu>
</menu>