Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

wrong tweets notification fixed.

bsmall bug fixes.
  • Loading branch information...
commit 5693a7d8d257396937584c3119d700ce4fb39867 1 parent 4cbfcde
@mariotaku authored
View
12 AndroidManifest.xml
@@ -423,13 +423,13 @@
android:label="@string/sign_in"/>
<activity
android:name=".activity.DataProfilingSettingsActivity"
- android:label="@string/data_profiling">
- </activity>
+ android:label="@string/data_profiling"/>
<service
android:name=".service.TwidereService"
android:label="@string/label_backend_service"
- android:permission="org.mariotaku.twidere.ACCESS_SERVICE">
+ android:permission="org.mariotaku.twidere.ACCESS_SERVICE"
+ android:settingsActivity=".activity.SettingsActivity">
<intent-filter>
<action android:name="org.mariotaku.twidere.SERVICE"/>
@@ -437,6 +437,10 @@
</intent-filter>
</service>
+ <service
+ android:name="edu.ucdavis.earlybird.UCDService"
+ android:settingsActivity=".activity.DataProfilingSettingsActivity"/>
+
<provider
android:name=".provider.TweetStoreProvider"
android:authorities="org.mariotaku.twidere.provider.TweetStore"
@@ -455,8 +459,6 @@
</intent-filter>
</receiver>
- <service android:name="edu.ucdavis.earlybird.UCDService"/>
-
<receiver
android:name="edu.ucdavis.earlybird.UploadReceiver"
android:exported="false">
View
BIN  res/drawable-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/drawable-ldpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/drawable-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/drawable-xhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
42 src/org/mariotaku/twidere/activity/ComposeActivity.java
@@ -157,7 +157,6 @@ public void invalidateSupportOptionsMenu() {
@Override
public void onActivityResult(final int requestCode, final int resultCode, final Intent intent) {
-
switch (requestCode) {
case REQUEST_TAKE_PHOTO: {
if (resultCode == Activity.RESULT_OK) {
@@ -170,7 +169,7 @@ public void onActivityResult(final int requestCode, final int resultCode, final
} else {
mIsPhotoAttached = false;
}
- setMenu(mMenuBar.getMenu());
+ setMenu();
} else {
mImageUri = null;
}
@@ -189,7 +188,7 @@ public void onActivityResult(final int requestCode, final int resultCode, final
} else {
mIsImageAttached = false;
}
- setMenu(mMenuBar.getMenu());
+ setMenu();
}
break;
}
@@ -223,7 +222,7 @@ public void onActivityResult(final int requestCode, final int resultCode, final
} else {
break;
}
- setMenu(mMenuBar.getMenu());
+ setMenu();
}
break;
}
@@ -248,7 +247,7 @@ public void onActivityResult(final int requestCode, final int resultCode, final
mImageUri = Uri.fromFile(file);
reloadAttachedImageThumbnail(file);
}
- setMenu(mMenuBar.getMenu());
+ setMenu();
}
break;
}
@@ -431,7 +430,6 @@ public void onCreate(final Bundle savedInstanceState) {
mImageThumbnailPreview.setOnLongClickListener(this);
mMenuBar.setOnMenuItemClickListener(this);
mMenuBar.inflate(R.menu.menu_compose);
- setMenu(mMenuBar.getMenu());
mMenuBar.show();
if (mPreferences.getBoolean(PREFERENCE_KEY_QUICK_SEND, false)) {
mEditText.setOnEditorActionListener(this);
@@ -448,7 +446,7 @@ public void onCreate(final Bundle savedInstanceState) {
mEditText.setSelection(mEditText.length());
}
}
- invalidateSupportOptionsMenu();
+ setMenu();
mColorIndicator.setOrientation(ColorView.VERTICAL);
mColorIndicator.setColor(getAccountColors(this, mAccountIds));
mContentModified = savedInstanceState != null ? savedInstanceState.getBoolean(INTENT_KEY_CONTENT_MODIFIED)
@@ -494,7 +492,6 @@ public void onLoadFinished(final Loader<Bitmap> loader, final Bitmap data) {
}
- /** Sets the mRecentLocation object to the current location of the device **/
@Override
public void onLocationChanged(final Location location) {
if (mRecentLocation == null) {
@@ -531,7 +528,7 @@ public boolean onMenuItemClick(final MenuItem item) {
getLocation();
}
mPreferences.edit().putBoolean(PREFERENCE_KEY_ATTACH_LOCATION, !attach_location).commit();
- setMenu(mMenuBar.getMenu());
+ setMenu();
break;
}
case MENU_DRAFTS: {
@@ -540,21 +537,18 @@ public boolean onMenuItemClick(final MenuItem item) {
}
case MENU_DELETE: {
if (mImageUri == null) return false;
- if (mIsImageAttached && !mIsPhotoAttached) {
- mImageUri = null;
-
- } else if (mIsPhotoAttached && !mIsImageAttached) {
- final File image_file = mImageUri != null && "file".equals(mImageUri.getScheme()) ? new File(
- mImageUri.getPath()) : null;
+ if (mIsPhotoAttached && !mIsImageAttached) {
+ final File image_file = "file".equals(mImageUri.getScheme()) ? new File(mImageUri.getPath())
+ : null;
if (image_file != null) {
image_file.delete();
}
- mImageUri = null;
}
+ mImageUri = null;
mIsPhotoAttached = false;
mIsImageAttached = false;
reloadAttachedImageThumbnail(null);
- setMenu(mMenuBar.getMenu());
+ setMenu();
break;
}
case MENU_EDIT: {
@@ -725,7 +719,7 @@ protected void onStart() {
final String uploader_component = mPreferences.getString(PREFERENCE_KEY_IMAGE_UPLOADER, null);
mUploadUseExtension = !isEmpty(uploader_component);
if (mMenuBar != null) {
- setMenu(mMenuBar.getMenu());
+ setMenu();
}
final int text_size = mPreferences.getInt(PREFERENCE_KEY_TEXT_SIZE, PREFERENCE_DEFAULT_TEXT_SIZE);
mEditText.setTextSize(text_size * 1.25f);
@@ -751,7 +745,12 @@ private boolean getLocation() {
final String provider = mLocationManager.getBestProvider(criteria, true);
if (provider != null) {
- final Location location = mLocationManager.getLastKnownLocation(provider);
+ final Location location;
+ if (mLocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
+ location = mLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
+ } else {
+ location = mLocationManager.getLastKnownLocation(provider);
+ }
if (location == null) {
mLocationManager.requestLocationUpdates(provider, 0, 0, this);
setSupportProgressBarIndeterminateVisibility(true);
@@ -796,7 +795,8 @@ private void send() {
finish();
}
- private void setMenu(final Menu menu) {
+ private void setMenu() {
+ final Menu menu = mMenuBar.getMenu();
final int activated_color = getResources().getColor(R.color.holo_blue_bright);
final MenuItem itemAddImage = menu.findItem(MENU_ADD_IMAGE);
final Drawable iconAddImage = itemAddImage.getIcon().mutate();
@@ -842,8 +842,8 @@ private void setMenu(final Menu menu) {
}
drafts_cur.close();
}
- invalidateSupportOptionsMenu();
mMenuBar.invalidate();
+ invalidateSupportOptionsMenu();
}
private void takePhoto() {
View
6 src/org/mariotaku/twidere/activity/FiltersActivity.java
@@ -61,7 +61,6 @@ public void onCreate(final Bundle savedInstanceState) {
mAdapter.addTab(FilteredKeywordsFragment.class, null, getString(R.string.keywords), null, 1);
mAdapter.addTab(FilteredSourcesFragment.class, null, getString(R.string.sources), null, 2);
mViewPager.setAdapter(mAdapter);
- // mViewPager.setPagingEnabled(false);
mIndicator.setViewPager(mViewPager);
mIndicator.setDisplayLabel(true);
mIndicator.setDisplayIcon(false);
@@ -75,6 +74,11 @@ public boolean onCreateOptionsMenu(final Menu menu) {
@Override
public boolean onOptionsItemSelected(final MenuItem item) {
+ switch (item.getItemId()) {
+ case MENU_HOME:
+ finish();
+ return true;
+ }
return false;
}
}
View
18 src/org/mariotaku/twidere/activity/HomeActivity.java
@@ -187,10 +187,7 @@ public void onCreate(final Bundle savedInstanceState) {
if (bundle != null) {
final long[] refreshed_ids = bundle.getLongArray(INTENT_KEY_IDS);
if (refreshed_ids != null && !refresh_on_start && savedInstanceState == null) {
- mService.getHomeTimeline(refreshed_ids, null);
- mService.getMentions(refreshed_ids, null);
- mService.getReceivedDirectMessages(account_ids, null);
- mService.getSentDirectMessages(account_ids, null);
+ mService.refreshAll();
}
initial_tab = bundle.getInt(INTENT_KEY_INITIAL_TAB, -1);
switch (initial_tab) {
@@ -246,15 +243,7 @@ public void onCreate(final Bundle savedInstanceState) {
}
}
if (refresh_on_start && savedInstanceState == null) {
- mService.getHomeTimelineWithSinceIds(activated_ids, null, null);
- if (mPreferences.getBoolean(PREFERENCE_KEY_HOME_REFRESH_MENTIONS, false)) {
- mService.getMentionsWithSinceIds(account_ids, null, null);
- }
- if (mPreferences.getBoolean(PREFERENCE_KEY_HOME_REFRESH_DIRECT_MESSAGES, false)) {
- mService.getReceivedDirectMessagesWithSinceIds(account_ids, null,
- getNewestMessageIdsFromDatabase(this, Inbox.CONTENT_URI));
- mService.getSentDirectMessagesWithSinceIds(account_ids, null, null);
- }
+ mService.refreshAll();
}
if (!mPreferences.getBoolean(PREFERENCE_KEY_API_UPGRADE_CONFIRMED, false)) {
final FragmentManager fm = getSupportFragmentManager();
@@ -478,8 +467,7 @@ protected void onNewIntent(final Intent intent) {
final long[] refreshed_ids = bundle.getLongArray(INTENT_KEY_IDS);
if (refreshed_ids != null) {
// TODO should I refresh inbox too?
- mService.getHomeTimelineWithSinceIds(refreshed_ids, null, null);
- mService.getMentionsWithSinceIds(refreshed_ids, null, null);
+ mService.refreshAll();
}
final int initial_tab = bundle.getInt(INTENT_KEY_INITIAL_TAB, -1);
if (initial_tab != -1 && mViewPager != null) {
View
2  src/org/mariotaku/twidere/preference/HomeRefreshContentPreference.java
@@ -41,7 +41,7 @@ public HomeRefreshContentPreference(final Context context, final AttributeSet at
@Override
protected boolean[] getDefaults() {
- return new boolean[] { false, false };
+ return new boolean[] { true, false };
}
@Override
View
2  src/org/mariotaku/twidere/preference/NotificationContentPreference.java
@@ -41,7 +41,7 @@ public NotificationContentPreference(final Context context, final AttributeSet a
@Override
protected boolean[] getDefaults() {
- return new boolean[] { false, false, false };
+ return new boolean[] { false, true, true };
}
@Override
Please sign in to comment.
Something went wrong with that request. Please try again.