gradle dependency update, bug fix

This commit is contained in:
nuclearfog 2019-12-08 16:13:14 +01:00
parent 338627af7e
commit 6b0a359aff
No known key found for this signature in database
GPG Key ID: ED35E22099354A64
5 changed files with 26 additions and 21 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.5.1" />
<option name="gradleHome" value="/opt/Gradle/gradle-6.0.1" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
@ -13,6 +13,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="testRunner" value="PLATFORM" />
</GradleProjectSettings>
</option>
</component>

View File

@ -36,7 +36,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'

View File

@ -110,7 +110,6 @@ public class MainActivity extends AppCompatActivity implements TabLayout.OnTabSe
if (returnCode == DB_CLEARED) {
adapter.clearData();
} else if (returnCode == APP_LOGOUT) {
adapter.clearData();
adapter = null;
} else {
adapter.notifySettingsChanged();

View File

@ -26,7 +26,6 @@ import static org.nuclearfog.twidda.fragment.UserListFragment.KEY_FRAG_USER_SEAR
public class FragmentAdapter extends FragmentPagerAdapter {
public enum AdapterType {
HOME_TAB,
PROFILE_TAB,
SEARCH_TAB,
TWEET_PAGE,
@ -41,14 +40,7 @@ public class FragmentAdapter extends FragmentPagerAdapter {
public FragmentAdapter(FragmentManager fManager) {
this(fManager, AdapterType.HOME_TAB, 0, "");
}
public FragmentAdapter(FragmentManager fManager, AdapterType mode, long id, String search) {
super(fManager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
switch (mode) {
case HOME_TAB:
Bundle home_tl = new Bundle();
Bundle ment_tl = new Bundle();
home_tl.putSerializable(KEY_FRAG_TWEET_MODE, TweetType.HOME);
@ -61,8 +53,12 @@ public class FragmentAdapter extends FragmentPagerAdapter {
fragments[2] = new TweetListFragment();
fragments[0].setArguments(home_tl);
fragments[2].setArguments(ment_tl);
break;
}
public FragmentAdapter(FragmentManager fManager, AdapterType mode, long id, String search) {
super(fManager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
switch (mode) {
case PROFILE_TAB:
Bundle usr_tweet = new Bundle();
Bundle usr_favor = new Bundle();

View File

@ -865,6 +865,7 @@ public class TwitterEngine {
* @param error Twitter4J Exception
*/
public EngineException(TwitterException error) {
super(error);
switch (error.getErrorCode()) {
case 88:
case 420: //
@ -921,10 +922,18 @@ public class TwitterEngine {
messageResource = R.string.error_accesstoken;
break;
default:
switch (error.getStatusCode()) {
case 401:
messageResource = R.string.not_authorized;
break;
default:
messageResource = R.string.error;
break;
}
break;
}
}
/**