Skip to content

Commit

Permalink
Issue photo#460 (Card 8) (Force album on upload for collaborators)
Browse files Browse the repository at this point in the history
- SettingsCommon: added disabling of autoUploadPreference in the
setAutoUploadPreference for limited collaborator access
- NewPhotoObserver: added additional check to the onEvent method to skip
autoupload process for limited collaborator access
  • Loading branch information
httpdispatch committed Oct 15, 2013
1 parent b9f42b5 commit f886046
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/src/com/trovebox/android/app/SettingsCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import org.holoeverywhere.app.Activity;
import org.holoeverywhere.app.AlertDialog;
import org.holoeverywhere.preference.CheckBoxPreference;
import org.holoeverywhere.preference.EditTextPreference;
import org.holoeverywhere.preference.Preference;
import org.holoeverywhere.preference.Preference.OnPreferenceChangeListener;
Expand Down Expand Up @@ -174,6 +175,10 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
return true;
}
});
if (Preferences.isLimitedAccountAccessType()) {
autoUploadPreference.setEnabled(false);
((CheckBoxPreference) autoUploadPreference).setChecked(false);
}
}

public PreferenceCategory getLoginCategory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public void onEvent(int event, String fileName) {
if (type != null && type.toLowerCase().startsWith("image/"))
{
TrackerUtils.trackBackgroundEvent("autoupload_observer", CommonUtils.format("Processed for Mime-Type: %1$s", type));
if (!Preferences.isAutoUploadActive(mContext) || !CommonUtils.checkLoggedIn(true)) {
if (!Preferences.isAutoUploadActive(mContext) || !CommonUtils.checkLoggedIn(true)
|| Preferences.isLimitedAccountAccessType()) {
return;
}
if (checkLimits())
Expand Down

0 comments on commit f886046

Please sign in to comment.