Commit Graph

4252 Commits

Author SHA1 Message Date
renovate[bot] 62c7d63131
Update dependency com.github.CanHub:Android-Image-Cropper to v4.3.2 (#3347)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-21 19:43:51 +01:00
renovate[bot] b35cc1fd6b
Update dependency com.github.penfeizhou.android.animation:glide-plugin to v2.24.0 (#3358)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-21 19:41:53 +01:00
renovate[bot] fc71e398d5
Update dependency com.github.UnifiedPush:android-connector to v2.1.1 (#3357)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-21 19:39:49 +01:00
renovate[bot] 01eefd94a0
Update dependency androidx.browser:browser to v1.5.0 (#3356)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-21 19:39:39 +01:00
renovate[bot] b62fc9bf07
Update dagger to v2.45 (#3355)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-21 19:37:44 +01:00
renovate[bot] 53f7afd9ee
Update androidx-work to v2.8.0 (#3354)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-21 19:37:33 +01:00
renovate[bot] aa14013adc
Update dependency io.reactivex.rxjava3:rxjava to v3.1.6 (#3353)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-21 19:37:07 +01:00
Nik Clayton 2974265c4a
Use the adapter position when responding to clicks on followed tags (#3334)
This ensures that the position is valid w.r.t. to the backing array.

Fixes https://github.com/tuskyapp/Tusky/issues/3333
2023-02-20 20:36:37 +01:00
renovate[bot] 8f3869d42e
Update dependency androidx.exifinterface:exifinterface to v1.3.6 (#3344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-20 20:36:22 +01:00
renovate[bot] ac87482e7a
Update dependency androidx.appcompat:appcompat to v1.6.1 (#3343)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-20 20:36:11 +01:00
Nik Clayton 15fb8ad43f
Update avatar size/placement for follow requests (#3280)
Use the same icon size/placement as other notifications.

Fixes https://github.com/tuskyapp/Tusky/issues/3279
2023-02-20 20:30:32 +01:00
Goooler 6cc79c8d75
Use unsafeLazy to simplify thread unsafe lazy initializations (#3276) 2023-02-20 20:14:54 +01:00
Nik Clayton 27f6976295
Add FAB to follow new hashtags from FollowedTagsActivity (#3275)
- Add a FAB for user interaction (hide on scroll if appropriate)
- Show a dialog to collect the new hashtag
- Autocomplete hashtags the same as when composing a status
2023-02-20 20:14:16 +01:00
Levi Bard 41d493e72a
Allow viewing of the account header image. (#3274)
Fixes #3254
2023-02-20 20:06:50 +01:00
Goooler cfea5700b0
Code cleanups (#3264)
* Kotlin 1.8.10

https://github.com/JetBrains/kotlin/releases/tag/v1.8.10

* Migrate onActivityCreated to onViewCreated

* More final modifiers

* Java Cleanups

* Kotlin cleanups

* More final modifiers

* Const value TOOLBAR_HIDE_DELAY_MS

* Revert
2023-02-20 19:58:37 +01:00
renovate[bot] 0baf3fe467
Add renovate.json (#3263)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-20 19:55:09 +01:00
Nik Clayton 52c98749e6
Fetch list title from second values in arguments (#3327)
Previous code was:

```
for (i in tabs.indices) {
    // ...
    if (tabs[i].id == LIST) {
        tab.contentDescription = tabs[i].arguments[1]
    } else {
        tab.setContentDescription(tabs[i].text)
    }
    // ...
```

When I converted it over, `i` was replaced with `position`, but I misread `tab.contentDescription = tabs[i].arguments[1]` as `tab.contentDescription = tabs[i].arguments[i]`.

Put the `1` back.
2023-02-16 20:43:44 +01:00
mcclure ab364712fe
Previous attempt to fix git sha on non-git build broke git build. (#3322)
This uses unusual code provided by Mikhail Lopatkin of Gradle Inc:
https://github.com/gradle/gradle/issues/23914#issuecomment-1431909019
It wraps the git sha function in a "value source". This allows it to interact correctly with configuration caching.
Because the code is longer than before, it is now broken out into its own file getGitSha.gradle.
2023-02-16 20:20:52 +01:00
Conny Duck b760ebe004 update tusky_banner.xcf 2023-02-15 20:05:45 +01:00
Nik Clayton 196ebdb386
Keep the tabs adapter over the life of the viewpager (#3255)
Make `tabs` `var` instead of `val` in `MainPagerAdapter` so it can be updated
when tabs change.

Then detach the `tabLayoutMediator`, update the tabs, and call
`notifyItemRangeChanged` in `setupTabs()`.

This fixes a bug (not sure if it's this code, or in ViewPager2) where
assigning a new adapter to the view pager seemed to result in a leak of one
or more fragments. This wasn't user-visible, but it's a leak, and it becomes
user-visible when fragments want to display menus.

This also fixes two other bugs:

1. Be on the left-most tab. Scroll down a bit. Then modify the tabs at
   "Account preferences > tabs", but keep the left-most tab as-is.

   Then go back to MainActivity. Your reading position in the left-most
   tab has been jumped to the top.

2. Be on any non-left-most tab. Then modify the tab list by reordering tabs
   (adding/removing tabs is also OK).

   Then go back to MainActivity. Your tab selection has been overridden,
   and the left-most tab has been selected.

Because the fragments are not destroyed unnecessarily your reading position
is retained. And it remembers the tab you had selected, and as long as that
tab is still present you will be returned to it, even if it's changed
position in the list.

Fixes https://github.com/tuskyapp/Tusky/issues/3251
2023-02-15 19:17:59 +01:00
Konrad Pozniak 53d4a02bdc
Merge pull request #3265 from nailyk-weblate/weblate-tusky-tusky-app
Translations update from Weblate
2023-02-14 22:09:30 +01:00
Konrad Pozniak ff5792db44
Merge pull request #3318 from nailyk-weblate/weblate-tusky-tusky
Translations update from Weblate
2023-02-14 21:37:43 +01:00
XoseM d85f5078a5 Translated using Weblate (Galician)
Currently translated at 100.0% (20 of 20 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/gl/
2023-02-14 20:31:25 +00:00
Danial Behzadi 5ba42792af Translated using Weblate (Persian)
Currently translated at 90.0% (18 of 20 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/fa/
2023-02-14 20:31:25 +00:00
Gera, Zoltan 2253878f8b Translated using Weblate (Hungarian)
Currently translated at 100.0% (20 of 20 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/hu/
2023-02-14 20:31:25 +00:00
Deleted User 5102f1cee2 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-14 20:31:25 +00:00
Ricard Torres bd19e81d89 Translated using Weblate (Spanish)
Currently translated at 100.0% (20 of 20 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/es/

Translated using Weblate (Catalan)

Currently translated at 100.0% (20 of 20 strings)

Translation: Tusky/Tusky description
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky-app/ca/
2023-02-14 20:31:25 +00:00
Levi Bard 395e21c956
Add support for updating media description and focus point when editing statuses (#3215)
* Add support for updating media description and focus point when editing statuses

* Don't publish description/focus point updates via the standard api when editing a published post
2023-02-14 21:13:38 +01:00
Konrad Pozniak d34586b7c8
Update Readme (#3304)
* Update Readme

* master -> main
2023-02-14 21:09:16 +01:00
Konrad Pozniak 80dbf6a491
Update Contributing.md (#3303) 2023-02-14 21:09:06 +01:00
XoseM 7c1a0ff5b3 Translated using Weblate (Galician)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
2023-02-14 20:07:20 +00:00
Hồ Nhất Duy 10c230332b Translated using Weblate (Vietnamese)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
2023-02-14 20:07:20 +00:00
Aleksandr Yakovlev aa685abe31 Translated using Weblate (Russian)
Currently translated at 77.3% (433 of 560 strings)

Co-authored-by: Aleksandr Yakovlev <keloero@oreolek.me>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/ru/
Translation: Tusky/Tusky
2023-02-14 20:07:20 +00:00
Eduardo 2dee16ac02 Translated using Weblate (Portuguese (Brazil))
Currently translated at 96.0% (538 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-02-14 20:07:20 +00:00
Danial Behzadi 8ece903401 Translated using Weblate (Persian)
Currently translated at 100.0% (564 of 564 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
2023-02-14 20:07:20 +00:00
Deleted User 969e4e9f1a Translated using Weblate (German)
Currently translated at 100.0% (560 of 560 strings)

Co-authored-by: Deleted User <noreply+256@weblate.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/de/
Translation: Tusky/Tusky
2023-02-14 20:07:20 +00: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