Commit Graph

4217 Commits

Author SHA1 Message Date
Konrad Pozniak 80dbf6a491
Update Contributing.md (#3303) 2023-02-14 21:09:06 +01:00
mcclure 4dc7919ec0
Fix sporadic failure in non-git build (using patch by @nikclayton) (#3307) 2023-02-14 20:15:42 +01:00
David Edwards 98e5363692
Add trending tags (#3149)
* Add initial feature for viewing trending graphs. Currently only views hash tag trends.

Contains API additions, tab additions and a set of trending components.

* Add clickable system through a LinkListener. Duplicates a little code from SFragment.

* Add accessibility description.

* The background for the graph should match the background for black theme too.

* Add error handling through a state flow system using existing code as an example.

* Graphing: Use a primary and a secondary line. Remove under line fill. Apply line thickness. Dotted end of line.

* Trending changes: New layout for trending: Cell. Use ViewBinding. Add padding to RecyclerView to stop the FAB from hiding content. Multiple bugs in GraphView resolved. Wide (landscape, for example) will show 4 columns, portrait will show 2. Remove unused base holder class. ViewModel invalidate scoping changed. Some renaming to variables made. For uses and accounts, use longs. These could be big numbers eventually. TagViewHolder renamed to TrendingTagViewHolder.

* Trending changes: Remove old layout. Update cell textsizes and use proper string. Remove bad comment.

* Trending changes: Refresh the main drawer when the tabs are edited. This will allow the trending item to toggle.

* Trending changes: Add a trending activity to be able to view the trending data from the main drawer.

* Trending changes: The title text should be changed to Trending Hashtags.

* Trending changes: Add meta color to draw axis etc. Draw the date boundaries on the graph. Remove dates from each cell and place them in the list as a header. Graphs should be proportional to the highest historical value. Add a new interface to control whether the FAB should be visible (important when switching tabs, the state is lost). Add header to the adapter and viewdata structures. Add QOL extensions for getting the dates from history.

* Trending changes: Refresh FAB through the main activity and FabFragment interface. Trending has no FAB.

* Trending changes: Make graph proportional to the highest usage value. Fixes to the graph ratio calculations.

* Trending changes: KtLintFix

* Trending changes: Remove accidental build gradle change. Remove trending cases. Remove unused progress. Set drawer button addition explicitly to false, leaving the code there for future issue #3010. Remove unnecessary arguments for intent. Remove media preview preferences, there is nothing to preview. No padding between hashtag symbol and text. Do not ellipsize hashtags.

* Trending changes: Use bottomsheet slide in animation helper for opening the hashtag intent. Remove explicit layout height from the XML and apply it to the view holder itself. The height was not being respected in XML.

* Use some platform standards for styling

- Align on an 8dp grid
- Use android:attr for paddingStart and paddingEnd
- Use textAppearanceListItem variants
- Adjust constraints to handle different size containers

* Correct lineWidth calculations

Previous code didn't convert the value to pixels, so it was always displaying
as a hairline stroke, irrespective of the value in the layout file.

While I'm here, rename from lineThickness to lineWidth, to be consistent
with parameters like strokeWidth.

* Does not need to inherit from FabFragment

* Rename to TrendingAdapter

"Paging" in the adapter name is a misnomer here

* Clean up comments, use full class name as tag

* Simplify TrendingViewModel

- Remove unncessary properties
- Fetch tags and map in invalidate()
- emptyList() instead of listOf() for clarity

* Remove line dividers, use X-axis to separate content

Experiment with UI -- instead of dividers between each item, draw an explicit
x-axis for each chart, and add a little more vertical padding, to see if that
provides a cleaner separation between the content

* Adjust date format

- Show day and year
- Use platform attributes for size

* Locale-aware format of numbers

Format numbers < 100,000 by inserting locale-aware separators. Numbers larger
are scaled and have K, M, G, ... etc suffix appended.

* Prevent a crash if viewData is empty

Don't access viewData without first checking if it's empty. This can be the
case if the server returned an empty list for some reason, or the data has
been filtered.

* Filter out tags the user has filtered from their home timeline

Invalidate the list if the user's preferences change, as that may indicate
they've changed their filters.

* Experiment with alternative layout

* Set chart height to 160dp to align to an 8dp grid

* Draw ticks that are 5% the height of the x-axis

* Legend adjustments

- Use tuskyblue for the ticks
- Wrap legend components in a layout so they can have a dedicated background
- Use a 60% transparent background for the legend to retain legibility
  if lines go under it

* Bezier curves, shorter cell height

* More tweaks

- List tags in order of popularity, most popular first
- Make it clear that uses/accounts in the legend are totals, not current
- Show current values at end of the chart

* Hide FAB

* Fix crash, it's not always hosted in an ActionButtonActivity

* Arrange totals vertically in landscape layout

* Always add the Trending drawer menu if it's not a tab

* Revert unrelated whitespace changes

* One more whitespace revert

---------

Co-authored-by: Nik Clayton <nik@ngo.org.uk>
2023-02-14 19:52:11 +01:00
mcclure 8d2ef28028
Small "Building" section in CONTRIBUTING.md. (#3298)
Covers minimum required Android Studio version, and the difference between "blue" and "green".
2023-02-11 13:16:04 +01:00
Conny Duck f6141e3309 revert en-gb string update 2023-02-11 13:07:14 +01:00
Konrad Pozniak 0562a651bf
Merge pull request #3302 from nailyk-weblate/weblate-tusky-tusky
Translations update from Weblate
2023-02-11 13:01:48 +01:00
Paul Sanz a1effeb6d0 Translated using Weblate (Spanish)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Paul Sanz <registro@polkillas.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/es/
Translation: Tusky/Tusky
2023-02-11 11:55:18 +00:00
Konrad Pozniak cc0b5ae1a2
Merge pull request #3296 from mcclure/live-without-git-2
Fix non-git build
2023-02-10 22:01:27 +01:00
Konrad Pozniak a6b5e6e0c2
Merge pull request #3262 from nailyk-weblate/weblate-tusky-tusky
Translations update from Weblate
2023-02-10 21:52:25 +01:00
mcc b3db7b91af Increase git hash from 7 back to 8 characters. Clearer comments 2023-02-10 15:33:53 -05:00
mcc fe8ed9f331 Fix merge error 2023-02-10 15:30:12 -05:00
mcc 7f55204998 Fix non-git build, broken by gradle modernization (PR#3171) 2023-02-10 15:22:32 -05:00
Mārtiņš Bruņenieks 94fb2c7487 Translated using Weblate (Latvian)
Currently translated at 94.6% (530 of 560 strings)

Co-authored-by: Mārtiņš Bruņenieks <martinsb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translation: Tusky/Tusky
2023-02-09 12:35:55 +00:00
Eric bec01cad2c Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
2023-02-09 12:35:55 +00:00
Gera, Zoltan a6c8c50b02 Translated using Weblate (Hungarian)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky
2023-02-09 12:35:55 +00:00
Ralf Thees df56e3bdb8 Translated using Weblate (German)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Ralf Thees <ralf@herrthees.de>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-02-09 12:35:55 +00:00
Deleted User 174c503642 Translated using Weblate (German)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Deleted User <noreply+253@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-02-09 12:35:55 +00:00
Deleted User 3092c9b773 Translated using Weblate (German)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Deleted User <noreply+252@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-02-09 12:35:54 +00:00
puf b1d44ce192 Translated using Weblate (English (United Kingdom))
Currently translated at 7.8% (44 of 560 strings)

Translated using Weblate (Welsh)

Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/en_GB/
Translation: Tusky/Tusky
2023-02-09 12:35:54 +00:00
GunChleoc aa6de31a08 Translated using Weblate (Gaelic)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: GunChleoc <fios@foramnagaidhlig.net>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gd/
Translation: Tusky/Tusky
2023-02-09 12:35:54 +00:00
Lin 17893f5564 Translated using Weblate (Chinese (Traditional))
Currently translated at 87.1% (488 of 560 strings)

Co-authored-by: Lin <012akt97@ouo.4wrd.cc>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hant/
Translation: Tusky/Tusky
2023-02-09 12:35:54 +00:00
Manuel da21741e98 Translated using Weblate (Italian)
Currently translated at 100.0% (560 of 560 strings)

Translated using Weblate (Italian)

Currently translated at 95.8% (537 of 560 strings)

Co-authored-by: Manuel <mannivuwiki@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/it/
Translation: Tusky/Tusky
2023-02-09 12:35:54 +00:00
Ricard Torres 433ae40659 Translated using Weblate (Catalan)
Currently translated at 100.0% (560 of 560 strings)

Translated using Weblate (Catalan)

Currently translated at 100.0% (560 of 560 strings)

Translated using Weblate (Catalan)

Currently translated at 90.7% (508 of 560 strings)

Translated using Weblate (Catalan)

Currently translated at 76.7% (430 of 560 strings)

Co-authored-by: Ricard Torres <ricard@ricard.dev>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ca/
Translation: Tusky/Tusky
2023-02-09 12:35:54 +00:00
Konrad Pozniak 15ff6191ae
Clean up Account adapters (#3202)
* make BlocksAdapter use viewbinding

* remove LoadingFooterViewHolder

* cleanup code

* move accountlist to component packes

* make FollowRequestsHeaderAdapter use viewbinding

* add license to MutesAdapter

* move accountlist to component packages

* use ConstraintLayout in item_blocked_user.xml

* support the bot badge everywhere

* cleanup code

* cleanup xml files

* ktlint

* ktlint
2023-02-04 20:29:13 +01:00
Konrad Pozniak 006f0de05c
Upgrade AndroidX dependencies (#3169)
* upgrade AndroidX dependencies

* use new @Upsert in InstanceDao

* fix crash because of new Room nullchecks

* make TimelineStatusEntity.reblogAccount a val as well
2023-02-04 20:22:29 +01:00
Nik Clayton 16df2bfe87
Be consistent about using sentence-case in notification setting titles (#3187) 2023-02-04 20:19:23 +01:00
Nik Clayton a1494ecc68
Perform preference schema upgrades at startup (#3186)
* Perform preference schema upgrades at startup

Over time it can be desirable to change how preferences are interpreted.

Preferences might be removed, or renamed. Or the default value for a
preference might be changed.

When this happens it's important that users upgrading from one version to
the next (or jumping from one version to several versions ahead) get a
consistent experience. In particular:

- Preferences that no longer exist should be deleted
- Preferences that have been renamed should have the old preference values
  copied over
- If the user used the default value for the preference, and the default has
  changed, the previous default value should be explicitly set as their
  value for the preference

To support this, store a SCHEMA_VERSION as a preference. This is not exposed
to the user, and corresponds to the app's VERSION_CODE.

If the version code does not match the schema version then this is a newer
version of the app with older preferences that may need to be changed.

Those changes will be implemented in `upgradeSharedPreferences`.

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/hu/
Translation: Tusky/Tusky

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky

* Translated using Weblate (Vietnamese)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky

* Translated using Weblate (Belarusian)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Mikalai <mikalai.hryb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky

* Translated using Weblate (Belarusian)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Andrej Zabavin <andre.zabavin@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky

* Translated using Weblate (Belarusian)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Mikalai <mikalai.hryb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky

* Translated using Weblate (Belarusian)

Currently translated at 100.0% (552 of 552 strings)

Translated using Weblate (Belarusian)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: xzFantom <xzfantom@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky

* Translated using Weblate (Japanese)

Currently translated at 91.3% (504 of 552 strings)

Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ja/
Translation: Tusky/Tusky

* Translated using Weblate (Icelandic)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky

* Translated using Weblate (Belarusian)

Currently translated at 100.0% (552 of 552 strings)

Co-authored-by: Mikalai <mikalai.hryb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky

* Lint

---------

Co-authored-by: Gera, Zoltan <gerazo@manioka.hu>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Co-authored-by: Mikalai <mikalai.hryb@gmail.com>
Co-authored-by: Andrej Zabavin <andre.zabavin@gmail.com>
Co-authored-by: xzFantom <xzfantom@gmail.com>
Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
2023-02-04 20:19:01 +01:00
Goooler 3592318dc1
Modernize a bit (#3171)
* Remove redundant ignore file

* Add .gitattributes

* Generate new wrapper

* Apply plugins in `plugins`

* Adopt new dsl

* Enable stable config cache

* Ignore all build folders

* Enable build scan

* Disable buildFeatures flags by default

* Migrate to nonTransitive R class

* Tweak flags

* Bump AGP to 7.4.0

* Bump deps

* Run `ktlintFormat`

* Add an icon for IDEA to display

* Revert "Bump deps"

This reverts commit bc0d5b69d5.

* Revert "Enable build scan"

This reverts commit 1568e5e84f.

* Remove com.android.library

* Enable Gradle cache

* Enable room incremental build

* Cleanups

* Cleanups

* Add .editorconfig

* Defer clean task

* Migrate `flavorDimensions`

* Merge instance-build.gradle into app's build.gradle

* Declare compileOptions & kotlinOptions

* Bump jvmTarget to 17

* Fix conflicts

* Xmx4g

* Rename output apks

* Revert "Bump jvmTarget to 17"

This reverts commit e4d1543bda.
2023-02-04 19:58:53 +01:00
Conny Duck be935655a5 Release 100 2023-02-03 20:10:46 +01:00
Konrad Pozniak 35bbee2b7f
Merge pull request #3258 from nailyk-weblate/weblate-tusky-tusky
Translations update from Weblate
2023-02-03 19:54:35 +01:00
Konrad Pozniak 823c00b02f
Merge pull request #3257 from nailyk-weblate/weblate-tusky-tusky-app
Translations update from Weblate
2023-02-03 19:54:22 +01:00
Connyduck 5d1864452e Translated using Weblate (German)
Currently translated at 96.6% (541 of 560 strings)

Co-authored-by: Connyduck <weblate@connyduck.at>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-02-03 18:48:53 +00:00
Connyduck 2461deaa44 Translated using Weblate (German)
Currently translated at 100.0% (20 of 20 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/de/
2023-02-03 18:48:32 +00:00
puf fb7590e046 Translated using Weblate (Welsh)
Currently translated at 100.0% (20 of 20 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/cy/
2023-02-03 18:48:32 +00:00
Konrad Pozniak aa1c5be1cb
Merge pull request #3256 from nailyk-weblate/weblate-tusky-tusky
Translations update from Weblate
2023-02-03 19:46:26 +01:00
Mārtiņš Bruņenieks 27b8e78a22 Translated using Weblate (Latvian)
Currently translated at 94.2% (528 of 560 strings)

Co-authored-by: Mārtiņš Bruņenieks <martinsb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translation: Tusky/Tusky
2023-02-03 18:22:27 +00:00
Connyduck 3d6b5a8f8f Translated using Weblate (German)
Currently translated at 96.6% (541 of 560 strings)

Co-authored-by: Connyduck <weblate@connyduck.at>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-02-03 18:22:26 +00:00
puf 4054386566 Translated using Weblate (Welsh)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: puf <puffinux@tutanota.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
2023-02-03 18:22:26 +00:00
Konrad Pozniak ff79919d2a
prevent the app from getting into an invalid state when old shortcuts are used (#3252) 2023-02-03 19:21:33 +01:00
Konrad Pozniak 07a4e97e9b
fix crash in ViewThreadFragment (#3250) 2023-02-03 19:21:21 +01:00
Nik Clayton fac62a638e
Set swipe scale factor to 2 (#3249)
Verified by enabling "Pointer Location" in the developer options, and then experimenting to see which angles trigger opens of the nav. drawer, and in a stock "Tabbed Activity" generated in Android Studio (New > Activity > Tabbed Activity) that uses ViewPager2.
2023-02-03 19:21:04 +01:00
Konrad Pozniak 6249dba467
improve avatars next to tabs (#3242) 2023-01-31 19:30:50 +01:00
Konrad Pozniak ebb9d22db4 Merge remote-tracking branch 'weblate/develop' into develop
# Conflicts:
#	app/src/main/res/values-sv/strings.xml
2023-01-31 19:30:29 +01:00
Konrad Pozniak ed06fffc90
Merge pull request #3247 from nailyk-weblate/weblate-tusky-tusky
Translations update from Weblate
2023-01-31 19:27:36 +01:00
Konrad Pozniak f4cfbecc81
Merge pull request #3245 from nailyk-weblate/weblate-tusky-tusky-app
Translations update from Weblate
2023-01-31 19:27:21 +01:00
Mārtiņš Bruņenieks 9d1651c254 Translated using Weblate (Latvian)
Currently translated at 91.9% (515 of 560 strings)

Co-authored-by: Mārtiņš Bruņenieks <martinsb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translation: Tusky/Tusky
2023-01-31 18:22:07 +00:00
Elias Mårtenson d1c9f4bb5d Translated using Weblate (Swedish)
Currently translated at 99.1% (555 of 560 strings)

Translated using Weblate (Swedish)

Currently translated at 98.0% (549 of 560 strings)

Co-authored-by: Elias Mårtenson <elias@dhsdevelopments.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sv/
Translation: Tusky/Tusky
2023-01-31 18:22:07 +00:00
Eduardo d24357eb4c Translated using Weblate (Portuguese (Brazil))
Currently translated at 95.7% (536 of 560 strings)

Co-authored-by: Eduardo <edu200399lim@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pt_BR/
Translation: Tusky/Tusky
2023-01-31 18:22:07 +00:00
Przemysław Wilde 577d19aff1 Translated using Weblate (Polish)
Currently translated at 99.8% (559 of 560 strings)

Co-authored-by: Przemysław Wilde <przemyslawwilde@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pl/
Translation: Tusky/Tusky
2023-01-31 18:22:07 +00:00
Grzegorz Cichocki 4ddab53802 Translated using Weblate (Polish)
Currently translated at 99.8% (559 of 560 strings)

Co-authored-by: Grzegorz Cichocki <grzegorz.cichocki@pollub.edu.pl>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/pl/
Translation: Tusky/Tusky
2023-01-31 18:22:07 +00:00