bug fix, gradle updates

This commit is contained in:
NudeDude 2019-08-15 17:55:58 +02:00
parent 51e7810c05
commit fca1ce9bf7
7 changed files with 20 additions and 23 deletions

View File

@ -5,7 +5,7 @@
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="/opt/Gradle/gradle-5.4.1" />
<option name="gradleHome" value="/opt/Gradle/gradle-5.5.1" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />

View File

@ -21,6 +21,7 @@ android {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {

View File

@ -96,8 +96,15 @@ public class ProfileEdit extends AppCompatActivity implements OnClickListener {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.action_save) {
if (editorAsync == null || editorAsync.getStatus() != RUNNING)
save();
if (editorAsync == null || editorAsync.getStatus() != RUNNING) {
EditText name = findViewById(R.id.edit_name);
if (name.getText().toString().trim().isEmpty()) {
Toast.makeText(this, R.string.edit_empty_name, LENGTH_SHORT).show();
} else {
editorAsync = new ProfileEditor(this, WRITE_DATA);
editorAsync.execute();
}
}
}
return super.onOptionsItemSelected(item);
}
@ -135,17 +142,6 @@ public class ProfileEdit extends AppCompatActivity implements OnClickListener {
}
private void save() {
EditText name = findViewById(R.id.edit_name);
if (name.getText().toString().trim().isEmpty()) {
Toast.makeText(this, R.string.edit_empty_name, LENGTH_SHORT).show();
} else {
editorAsync = new ProfileEditor(this, WRITE_DATA);
editorAsync.execute();
}
}
private void getMedia() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
int check = checkSelfPermission(READ_EXTERNAL_STORAGE);

View File

@ -123,10 +123,10 @@ public class TweetDetail extends AppCompatActivity implements OnClickListener, O
@Override
protected void onStop() {
super.onStop();
protected void onDestroy() {
if (statusAsync != null && statusAsync.getStatus() == RUNNING)
statusAsync.cancel(true);
super.onDestroy();
}

View File

@ -31,7 +31,6 @@ import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.adapter.FragmentAdapter;
import org.nuclearfog.twidda.adapter.FragmentAdapter.AdapterType;
import org.nuclearfog.twidda.backend.ProfileLoader;
import org.nuclearfog.twidda.backend.ProfileLoader.Mode;
import org.nuclearfog.twidda.database.GlobalSettings;
import java.text.NumberFormat;
@ -41,6 +40,7 @@ import static android.os.AsyncTask.Status.RUNNING;
import static android.view.MotionEvent.ACTION_DOWN;
import static android.view.MotionEvent.ACTION_UP;
import static android.widget.Toast.LENGTH_SHORT;
import static org.nuclearfog.twidda.backend.ProfileLoader.Mode.LDR_PROFILE;
import static org.nuclearfog.twidda.window.MessagePopup.KEY_DM_ADDITION;
import static org.nuclearfog.twidda.window.SearchPage.KEY_SEARCH;
import static org.nuclearfog.twidda.window.TweetPopup.KEY_TWEETPOPUP_ADDITION;
@ -132,17 +132,17 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
protected void onStart() {
super.onStart();
if (profileAsync == null) {
profileAsync = new ProfileLoader(this, Mode.LDR_PROFILE);
profileAsync = new ProfileLoader(this, LDR_PROFILE);
profileAsync.execute(userId);
}
}
@Override
protected void onStop() {
protected void onDestroy() {
if (profileAsync != null && profileAsync.getStatus() == RUNNING)
profileAsync.cancel(true);
super.onStop();
super.onDestroy();
}

View File

@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.4.2'
}
}

View File

@ -1,6 +1,6 @@
#Wed Jan 10 20:47:44 CET 2018
#Mon Jul 29 11:05:47 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip