code cleanup

This commit is contained in:
NudeDude 2018-08-18 17:57:00 +02:00
parent 13b21a9067
commit 5944b70785
5 changed files with 9 additions and 13 deletions

View File

@ -30,5 +30,5 @@
-dontwarn javax.**
-keep class javax.** {*;}
-dontwarn org.**
-keep class org.** {*;}
-dontwarn org.conscrypt**
-keep class org.conscrypt** {*;}

View File

@ -44,7 +44,6 @@ public class MainActivity extends AppCompatActivity implements OnRefreshListener
private TabHost tabhost;
private int tabIndex = 0;
private boolean settingChanged = false;
private final int REQ_CODE = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -56,7 +55,7 @@ public class MainActivity extends AppCompatActivity implements OnRefreshListener
if( !login ) {
Intent i = new Intent(this, LoginPage.class);
startActivityForResult(i,REQ_CODE);
startActivityForResult(i, 1);
}
timelineList = findViewById(R.id.tl_list);
@ -105,11 +104,9 @@ public class MainActivity extends AppCompatActivity implements OnRefreshListener
@Override
protected void onActivityResult(int reqCode, int returnCode, Intent i) {
super.onActivityResult(reqCode,returnCode,i);
if(reqCode == REQ_CODE) {
if (returnCode != RESULT_OK) {
overridePendingTransition(0, 0);
finish();
}
if (returnCode == RESULT_CANCELED) {
overridePendingTransition(0, 0);
finish();
}
}

View File

@ -146,7 +146,7 @@ public class MainPage extends AsyncTask<Integer, Void, Integer> {
mentionAdapter.setData(mention);
break;
}
} catch(TwitterException e) {
} catch (TwitterException e) {
returnCode = e.getErrorCode();
if (returnCode > 0 && returnCode != 420) {
errMsg += e.getMessage();

View File

@ -68,5 +68,4 @@ public class Registration extends AsyncTask<String, Void, Boolean> {
public interface OnConnect {
void connect(String link);
}
}
}

View File

@ -144,7 +144,7 @@ public class StatusLoader extends AsyncTask<Long, Void, Long> {
if(!favorited) {
favCount++;
favorited = true;
database.storeFavorite(tweet);
database.storeFavorite(tweetID);
} else {
if(favCount > 0)
favCount--;