New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New settings #891

Merged
merged 23 commits into from Nov 12, 2018

Conversation

Projects
None yet
5 participants
@connyduck
Member

connyduck commented Oct 21, 2018

new settings, as outlined in #716

closes #716, closes #607, closes #534

  • new menu entry "account preferences", blocked and muted users have moved
  • its now possible to set more options per account, and some will even sync with mastodon server
  • new option "always mark media as sensitive", default off
  • finally all fragments inherit from android.support.v4.app.Fragment so injection works everywhere. had to change the emoji preference and the regex preference for this

note that the indentation of the preference category title is a bug in the Android support library that will be fixed in their next release

not sure about the new icon for Drafts. Another possibility would be to use something like that http://materialdesignicons.com/icon/book-multiple-variant

todo:

  • db migrations
  • clean up and convert more stuff to Kotlin
  • test
val lightPref = findPreference("notificationAlertLight") as SwitchPreference
lightPref.isChecked = activeAccount.notificationLight
lightPref.onPreferenceChangeListener = this

This comment has been minimized.

@Tak

Tak Oct 21, 2018

Contributor

That's a lot of boilerplate 🙂

This comment has been minimized.

@connyduck

connyduck Oct 21, 2018

Member

indeed 😅
do you have a better idea?

This comment has been minimized.

@charlag

charlag Oct 21, 2018

Collaborator

We can invent a function or use something like apply but it doesn't worth it I guess

@@ -33,4 +34,14 @@ class Converters {
fun emojiListToJson(emojiList: List<Emoji>?): String {
return gson.toJson(emojiList)
}

This comment has been minimized.

@charlag

charlag Oct 21, 2018

Collaborator

I have very similar converter in #892
Maybe we can extract it later

@charlag

This comment has been minimized.

Collaborator

charlag commented Oct 21, 2018

This looks really sick!
If you need any help with migrations or testing migrations, don't hesitate to ping me 😉

@connyduck

This comment has been minimized.

Member

connyduck commented Nov 1, 2018

So I think this is now done! Would be great if somebody else could test it before its merged!

@charlag

This comment has been minimized.

Collaborator

charlag commented Nov 1, 2018

I will try to check it today or tomorrow

@charlag

charlag approved these changes Nov 1, 2018

"Hide compose button while scrolling" doesn't fit for me and I don't know how to solve this.
Otherwise looks good to me.
I didn't test migration but I believe you did.
Otherwise I tested pretty much everything except regexp filtering and proxy, I hope that's okay.

@Tak

This comment has been minimized.

Contributor

Tak commented Nov 2, 2018

Looks good to me, I'll run it on my phone for a while

@Tak

This comment has been minimized.

Contributor

Tak commented Nov 2, 2018

Did you want to remove the setting for notification check interval while you're in there?

@connyduck

This comment has been minimized.

Member

connyduck commented Nov 4, 2018

Did you want to remove the setting for notification check interval while you're in there?

no, because feedback was very mixed I decided to leave it

Edit: actually yes, the vote is 28:4, lets remove it, thx for reminding me

preferences.registerOnSharedPreferenceChangeListener(this);
alwaysShowSensitiveMedia = preferences.getBoolean("alwaysShowSensitiveMedia", false);
boolean mediaPreviewEnabled = preferences.getBoolean("mediaPreviewEnabled", true);
alwaysShowSensitiveMedia = accountManager.getActiveAccount().getMediaPreviewEnabled();

This comment has been minimized.

@Tak

Tak Nov 5, 2018

Contributor

This seems problematic 😉

This comment has been minimized.

@connyduck

connyduck Nov 7, 2018

Member

yes indeed, thx for noticing

connyduck and others added some commits Nov 7, 2018

Update Chinese translations. (#915)
* Update zh-CN translations.

* Update zh-SG translations.

* Update zh-TW translations.

* Update zh-MO translations.

* Update zh-HK translations.

* Fix errors in zh-CN translations.

* Fix errors in zh-SG translations.

* Fix errors in zh-TW translations.

* Fix errors in zh-MO translations.

* Fix errors in zh-HK translations.
Merge branch 'master' into new-settings
# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java
#	app/src/main/java/com/keylesspalace/tusky/db/AppDatabase.java

@connyduck connyduck merged commit 348c20c into master Nov 12, 2018

3 checks passed

ci/bitrise/a3e773c3c57a894c/pr Passed - Tusky
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
@ariasuni

This comment has been minimized.

ariasuni commented Nov 13, 2018

Awesome, thanks a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment