Revision 72b0db4c

View differences:

app/src/info/guardianproject/notepadbot/NoteCipher.java
232 232
                    mCacheWord.manuallyLock();
233 233
                return true;
234 234
            case SETTINGS_ID:
235
            	startActivity(new Intent(this, Settings.class));
235
            	if ( !mCacheWord.isLocked()) {
236
            		startActivity(new Intent(this, Settings.class));
237
            	}
236 238
                return true;
237 239
        }
238 240

  
......
274 276
    }
275 277

  
276 278
    private void shareEntry(final long id) {
277
        if (mCacheWord.isLocked())
279
        if (mCacheWord.isLocked()) {
278 280
            return;
281
        }
279 282
        
280 283
        getSupportLoaderManager().restartLoader(SHARE_ID, null, new LoaderManager.LoaderCallbacks<Cursor>() {
281 284

  
......
445 448
     * Call this to delete the original image, will ask the user
446 449
     */
447 450
    private void handleDelete() {
451
    	if (mCacheWord.isLocked()) {
452
            return;
453
        }
448 454
        final AlertDialog.Builder b = new AlertDialog.Builder(this);
449 455
        b.setIcon(android.R.drawable.ic_dialog_alert);
450 456
        b.setTitle(R.string.app_name);
app/src/info/guardianproject/notepadbot/Settings.java
77 77

  
78 78
	@Override
79 79
	public void onDestroy() {
80
		// reload preferences on exit from settings screen
81
		Context context = getApplicationContext();
82
		loadSettings(context);
83 80
		super.onDestroy();
84 81
	}
85

  
86
	/** Loads user settings to app. Called when settings change and users exits from 
87
	 *  settings screen or when the app first starts. 
88
	 *  */
89
	public static void loadSettings(Context context) {
90
		
91
	}
92 82
	
93 83
	private Preference.OnPreferenceClickListener changeLockTimeoutListener = 
94 84
			new Preference.OnPreferenceClickListener() {
......
115 105
	}
116 106
	
117 107
	private void changeTimeoutPrompt() {
108
		if (mCacheWord.isLocked())
109
            return;
110
		
118 111
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
119 112
        builder.setTitle(R.string.change_timeout_prompt_title);
120 113
        builder.setMessage(R.string.change_timeout_prompt);

Also available in: Unified diff