2023-02-04 19:58:53 +01:00
|
|
|
plugins {
|
|
|
|
alias(libs.plugins.android.application)
|
2023-06-29 18:37:46 +02:00
|
|
|
alias(libs.plugins.google.ksp)
|
2023-02-04 19:58:53 +01:00
|
|
|
alias(libs.plugins.kotlin.android)
|
|
|
|
alias(libs.plugins.kotlin.kapt)
|
|
|
|
alias(libs.plugins.kotlin.parcelize)
|
2023-09-01 20:33:23 +02:00
|
|
|
alias(libs.plugins.aboutlibraries)
|
2023-10-07 19:30:11 +02:00
|
|
|
alias(libs.plugins.hilt)
|
2023-10-03 12:56:30 +02:00
|
|
|
|
|
|
|
id "app.pachli.plugins.markdown2resource"
|
2018-07-16 19:01:34 +02:00
|
|
|
}
|
|
|
|
|
2023-09-28 13:50:02 +02:00
|
|
|
apply from: 'gitTools.gradle'
|
2023-02-10 21:22:32 +01:00
|
|
|
|
2023-02-16 20:20:52 +01:00
|
|
|
final def gitSha = ext.getGitSha()
|
2023-09-28 13:50:02 +02:00
|
|
|
final def gitRevCount = ext.getGitRevCount()
|
2023-02-04 19:58:53 +01:00
|
|
|
|
|
|
|
// The app name
|
2023-09-05 13:28:56 +02:00
|
|
|
final def APP_NAME = "Pachli"
|
2023-02-04 19:58:53 +01:00
|
|
|
// The application id. Must be unique, e.g. based on your domain
|
2023-09-05 13:28:56 +02:00
|
|
|
final def APP_ID = "app.pachli"
|
|
|
|
// url of a custom app logo. Recommended size at least 600x600. Keep empty to use the default logo.
|
2023-02-04 19:58:53 +01:00
|
|
|
final def CUSTOM_LOGO_URL = ""
|
|
|
|
// e.g. mastodon.social. Keep empty to not suggest any instance on the signup screen
|
|
|
|
final def CUSTOM_INSTANCE = ""
|
|
|
|
// link to your support account. Will be linked on the about page when not empty.
|
2023-09-05 13:28:56 +02:00
|
|
|
final def SUPPORT_ACCOUNT_URL = "https://mastodon.social/@Pachli"
|
2023-02-04 19:58:53 +01:00
|
|
|
|
2017-01-03 00:30:27 +01:00
|
|
|
android {
|
2023-02-04 19:58:53 +01:00
|
|
|
compileSdk 33
|
2023-09-05 13:28:56 +02:00
|
|
|
namespace "app.pachli"
|
2017-01-03 00:30:27 +01:00
|
|
|
defaultConfig {
|
2019-10-29 20:30:46 +01:00
|
|
|
applicationId APP_ID
|
2023-09-05 13:28:56 +02:00
|
|
|
namespace "app.pachli"
|
2023-02-04 19:58:53 +01:00
|
|
|
minSdk 23
|
|
|
|
targetSdk 33
|
2023-10-03 13:21:53 +02:00
|
|
|
versionCode 5
|
|
|
|
versionName "1.2.2"
|
2018-12-17 15:25:35 +01:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-09-25 19:04:57 +02:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2018-12-25 20:06:28 +01:00
|
|
|
|
2019-10-29 20:30:46 +01:00
|
|
|
resValue "string", "app_name", APP_NAME
|
|
|
|
|
|
|
|
buildConfigField("String", "CUSTOM_LOGO_URL", "\"$CUSTOM_LOGO_URL\"")
|
|
|
|
buildConfigField("String", "CUSTOM_INSTANCE", "\"$CUSTOM_INSTANCE\"")
|
|
|
|
buildConfigField("String", "SUPPORT_ACCOUNT_URL", "\"$SUPPORT_ACCOUNT_URL\"")
|
2017-01-03 00:30:27 +01:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
2017-04-08 00:08:51 +02:00
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2018-08-15 20:46:37 +02:00
|
|
|
proguardFiles 'proguard-rules.pro'
|
2017-01-03 00:30:27 +01:00
|
|
|
}
|
2018-07-16 19:01:34 +02:00
|
|
|
}
|
|
|
|
|
2023-02-04 19:58:53 +01:00
|
|
|
flavorDimensions += "color"
|
2018-07-16 19:01:34 +02:00
|
|
|
productFlavors {
|
2019-06-09 16:55:34 +02:00
|
|
|
blue {}
|
2023-09-05 13:28:56 +02:00
|
|
|
orange {
|
|
|
|
resValue "string", "app_name", APP_NAME + " Current"
|
|
|
|
applicationIdSuffix ".current"
|
2023-09-28 13:50:02 +02:00
|
|
|
versionNameSuffix "+" + gitSha
|
2017-12-08 12:15:46 +01:00
|
|
|
}
|
2017-01-03 00:30:27 +01:00
|
|
|
}
|
2017-10-25 21:56:27 +02:00
|
|
|
|
2023-02-04 19:58:53 +01:00
|
|
|
lint {
|
2023-03-13 10:23:42 +01:00
|
|
|
lintConfig file("lint.xml")
|
2023-08-07 19:30:21 +02:00
|
|
|
// Regenerate by running `./gradlew app:newLintBaseline`
|
2023-03-13 10:23:42 +01:00
|
|
|
baseline = file("lint-baseline.xml")
|
2017-04-13 06:01:02 +02:00
|
|
|
}
|
2023-03-13 10:23:42 +01:00
|
|
|
|
2021-01-21 18:57:09 +01:00
|
|
|
buildFeatures {
|
2023-02-04 19:58:53 +01:00
|
|
|
buildConfig true
|
|
|
|
resValues true
|
2021-01-21 18:57:09 +01:00
|
|
|
viewBinding true
|
|
|
|
}
|
2018-03-09 22:02:32 +01:00
|
|
|
testOptions {
|
|
|
|
unitTests {
|
2019-09-22 08:18:44 +02:00
|
|
|
returnDefaultValues = true
|
2018-03-09 22:02:32 +01:00
|
|
|
includeAndroidResources = true
|
|
|
|
}
|
2023-01-12 19:10:11 +01:00
|
|
|
unitTests.all {
|
|
|
|
systemProperty 'robolectric.logging.enabled', 'true'
|
2023-02-28 21:28:05 +01:00
|
|
|
systemProperty 'robolectric.lazyload', 'ON'
|
2023-02-04 19:58:53 +01:00
|
|
|
}
|
2018-03-09 22:02:32 +01:00
|
|
|
}
|
2018-12-25 20:06:28 +01:00
|
|
|
sourceSets {
|
|
|
|
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
|
|
|
|
}
|
|
|
|
|
2023-02-04 19:58:53 +01:00
|
|
|
// Exclude unneeded files added by libraries
|
|
|
|
packagingOptions.resources.excludes += [
|
|
|
|
'LICENSE_OFL',
|
|
|
|
'LICENSE_UNICODE',
|
|
|
|
]
|
|
|
|
|
2019-03-29 19:56:53 +01:00
|
|
|
bundle {
|
|
|
|
language {
|
|
|
|
// bundle all languages in every apk so the dynamic language switching works
|
|
|
|
enableSplit = false
|
|
|
|
}
|
|
|
|
}
|
2023-09-27 18:06:14 +02:00
|
|
|
|
2022-12-05 19:13:15 +01:00
|
|
|
dependenciesInfo {
|
|
|
|
includeInApk false
|
|
|
|
includeInBundle false
|
|
|
|
}
|
2023-09-27 18:06:14 +02:00
|
|
|
|
2023-02-04 19:58:53 +01:00
|
|
|
applicationVariants.configureEach { variant ->
|
2023-09-28 13:50:02 +02:00
|
|
|
tasks.register("printVersionInfo${variant.name.capitalize()}") {
|
|
|
|
notCompatibleWithConfigurationCache("Should always print the version info")
|
|
|
|
println variant.versionCode + " " + variant.versionName
|
|
|
|
}
|
2023-02-04 19:58:53 +01:00
|
|
|
variant.outputs.configureEach {
|
2023-09-28 13:50:02 +02:00
|
|
|
// Set the "orange" release versionCode to the number of commits on the
|
|
|
|
// branch, to ensure the versionCode updates on every release.
|
|
|
|
if (variant.buildType.name == "release" && variant.flavorName == "orange") {
|
|
|
|
versionCodeOverride = gitRevCount
|
|
|
|
}
|
2023-09-05 13:28:56 +02:00
|
|
|
outputFileName = "Pachli_${variant.versionName}_${variant.versionCode}_${gitSha}_" +
|
2023-02-04 19:58:53 +01:00
|
|
|
"${variant.flavorName}_${buildType.name}.apk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-29 18:37:46 +02:00
|
|
|
ksp {
|
|
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
|
|
arg("room.incremental", "true")
|
2019-05-18 08:06:30 +02:00
|
|
|
}
|
|
|
|
|
2023-03-13 10:18:41 +01:00
|
|
|
configurations {
|
|
|
|
// JNI-only libraries don't play nicely with Robolectric
|
|
|
|
// see https://github.com/tuskyapp/Tusky/pull/3367
|
|
|
|
testImplementation.exclude group: "org.conscrypt", module: "conscrypt-android"
|
|
|
|
testRuntime.exclude group: "org.conscrypt", module: "conscrypt-android"
|
|
|
|
}
|
|
|
|
|
2023-09-01 20:33:23 +02:00
|
|
|
aboutLibraries {
|
|
|
|
configPath = "licenses"
|
|
|
|
includePlatform = false
|
|
|
|
duplicationMode = com.mikepenz.aboutlibraries.plugin.DuplicateMode.MERGE
|
|
|
|
prettyPrint = true
|
|
|
|
}
|
|
|
|
|
2023-10-03 12:56:30 +02:00
|
|
|
markdown2resource {
|
|
|
|
files = [ layout.projectDirectory.file('../PRIVACY.md') ]
|
|
|
|
}
|
|
|
|
|
2022-11-04 20:10:26 +01:00
|
|
|
// library versions are in PROJECT_ROOT/gradle/libs.versions.toml
|
2017-01-03 00:30:27 +01:00
|
|
|
dependencies {
|
2022-11-04 20:10:26 +01:00
|
|
|
implementation libs.kotlinx.coroutines.android
|
|
|
|
implementation libs.kotlinx.coroutines.rx3
|
|
|
|
|
|
|
|
implementation libs.bundles.androidx
|
|
|
|
implementation libs.bundles.room
|
2023-06-29 18:37:46 +02:00
|
|
|
ksp libs.androidx.room.compiler
|
2022-11-04 20:10:26 +01:00
|
|
|
|
|
|
|
implementation libs.android.material
|
|
|
|
|
|
|
|
implementation libs.gson
|
|
|
|
|
|
|
|
implementation libs.bundles.retrofit
|
|
|
|
implementation libs.networkresult.calladapter
|
|
|
|
|
|
|
|
implementation libs.bundles.okhttp
|
|
|
|
|
|
|
|
implementation libs.conscrypt.android
|
|
|
|
|
|
|
|
implementation libs.bundles.glide
|
2023-07-11 15:34:14 +02:00
|
|
|
ksp libs.glide.compiler
|
2022-11-04 20:10:26 +01:00
|
|
|
|
|
|
|
implementation libs.bundles.rxjava3
|
|
|
|
|
|
|
|
implementation libs.bundles.autodispose
|
|
|
|
|
2023-10-07 19:30:11 +02:00
|
|
|
implementation libs.hilt.android
|
|
|
|
kapt libs.hilt.compiler
|
2022-11-04 20:10:26 +01:00
|
|
|
|
|
|
|
implementation libs.sparkbutton
|
|
|
|
|
Fix image zoom / pan / scroll / swipe (#3894)
Migrate to touchimageview from photoview, and adjust the touch logic to correctly handle single finger drag, two finger pinch/stretch, flings, taps, and swipes.
As before, the features are:
- Single tap, show/hide controls and media description
- Double tap, zoom in/out
- Single finger drag up/down, scale/translate image, dismiss if scrolled too far
- Single finger drag left/right
- When not zoomed, swipe to next image if multiple images present
- When zoomed, scroll to edge of image, then to next image if multiple images present
- Two finger pinch/zoom, zoom in/out on the image
Behaviour differences to previous code
1. Bug fix: The image can't get "stuck" when zoomed, and impossible to scroll
2. Bug fix: Pinching is not mis-interpreted as a fling, closing the image
3. Bug fix: The zoom state of images is not lost or misinterpreted when the user swipes through multiple images
4. Bug fix: Double-tap zooms all the way, instead of stopping
5. Tapping outside the image does not dismiss it, controls and description show/hide
Fixes https://github.com/tuskyapp/Tusky/issues/3562, https://github.com/tuskyapp/Tusky/issues/2297
2023-07-31 12:44:01 +02:00
|
|
|
implementation libs.touchimageview
|
2022-11-04 20:10:26 +01:00
|
|
|
|
|
|
|
implementation libs.bundles.material.drawer
|
2023-02-04 19:58:53 +01:00
|
|
|
implementation libs.material.typeface
|
2022-11-04 20:10:26 +01:00
|
|
|
|
|
|
|
implementation libs.image.cropper
|
|
|
|
|
|
|
|
implementation libs.bundles.filemojicompat
|
|
|
|
|
|
|
|
implementation libs.bouncycastle
|
|
|
|
implementation libs.unified.push
|
|
|
|
|
2023-03-10 20:30:55 +01:00
|
|
|
implementation libs.bundles.xmldiff
|
2023-09-05 13:28:56 +02:00
|
|
|
|
2023-09-01 20:33:23 +02:00
|
|
|
implementation libs.bundles.aboutlibraries
|
2023-03-10 20:30:55 +01:00
|
|
|
|
2022-11-04 20:10:26 +01:00
|
|
|
testImplementation libs.androidx.test.junit
|
|
|
|
testImplementation libs.robolectric
|
|
|
|
testImplementation libs.bundles.mockito
|
|
|
|
testImplementation libs.mockwebserver
|
|
|
|
testImplementation libs.androidx.core.testing
|
|
|
|
testImplementation libs.kotlinx.coroutines.test
|
2022-11-07 20:04:07 +01:00
|
|
|
testImplementation libs.androidx.work.testing
|
Convert NotificationsFragment and related code to Kotlin, use the Paging library (#3159)
* Unmodified output from "Convert Java to Kotlin" on NotificationsFragment.java
* Bare minimum changes to get this to compile and run
- Use `lateinit` for `eventhub`, `adapter`, `preferences`, and `scrolllistener`
- Removed override for accountManager, it can be used from the superclass
- Add `?.` where non-nullity could not (yet) be guaranteed
- Remove `?` from type lists where non-nullity is guaranteed
- Explicitly convert lists to mutable where necessary
- Delete unused function `findReplyPosition`
* Remove all unnecessary non-null (!!) assertions
The previous change meant some values are no longer nullable. Remove the
non-null assertions.
* Lint ListStatusAccessibilityDelegate call
- Remove redundant constructor
- Move block outside of `()`
* Use `let` when handling compose button visibility on scroll
* Replace a `requireNonNull` with `!!`
* Remove redundant return values
* Remove or rename unused lambda parameters
* Remove unnecessary type parameters
* Remove unnecessary null checks
* Replace cascading-if statement with `when`
* Simplify calculation of `topId`
* Use more appropriate list properties and methods
- Access the last value with `.last()`
- Access the last index with `.lastIndex`
- Replace logical-chain with `asRightOrNull` and `?.`
- `.isNotEmpty()`, not `!...isEmpty()`
* Inline unnecessary variable
* Use PrefKeys constants instead of bare strings
* Use `requireContext()` instead of `context!!`
* Replace deprecated `onActivityCreated()` with `onViewCreated()`
* Remove unnecessary variable setting
* Replace `size == 0` check with `isEmpty()`
* Format with ktlint, no functionality changes
* Convert NotifcationsAdapter to Kotlin
Does not compile, this is the unchanged output of the "Convert to Kotlin"
function
* Minimum changes to get NotificationsAdapter to compile
* Remove unnecessary visibility modifiers
* Use `isNotEmpty()`
* Remove unused lambda parameters
* Convert cascading-if to `when`
* Simplifiy assignment op
* Use explicit argument names with `copy()`
* Use `.firstOrNull()` instead of `if`
* Mark as lateinit to avoid unnecessary null checks
* Format with ktlint, whitespace changes only
* Bare minimum necessary to demonstrate paging in notifications
Create `NotificationsPagingSource`. This uses a new `notifications2()` API
call, which will exist until all the code has been adapted. Instead of
using placeholders,
Create `NotificationsPagingAdapter` (will replace `NotificationsAdapater`)
to consume this data.
Expose the paging source view a new `NotificationsViewModel` `flow`, and
submit new pages to the adapter as they are available in
`NotificationsFragment`.
Comment out any other code in `NotificationsFragment` that deals with
loading data from the network. This will be updated as necessary, either
here, or in the view model.
Lots of functionality is missing, including:
- Different views for different notification types
- Starting at the remembered notification position
- Interacting with notifications
- Adjusting the UI state to match the loading state
These will be added incrementally.
* Migrate StatusNotificationViewHolder impl. to NotificationsPagingAdapter
With this change `NotificationsPagingAdapter` shows notifications about a
status correctly.
- Introduce a `ViewHolder` abstract class that all Notification view holders
derive from. Modify the fallback view holder to use this.
- Implement `StatusNotificationViewHolder`. Much of the code is from the
existing implementation in the `NotificationAdapater`.
- The original code split the code that binds values to views between the
adapter's `bindViewHolder` method and the view holder's methods.
In this code, all of the binding code is in the view holder, in a `bind`
method. This is called by the adapter's `bindViewHolder` method. This keeps
all the binding logic in the view holder, where it belongs.
- The new `StatusNotificationViewHolder` uses view binding to access its views
instead of `findViewById`.
- Logically, information about whether to show sensitive media, or open
content warnings should be part of the `StatusDisplayOptions`. So add those
as fields, and populate them appropriately.
This affects code outside notification handling, which will be adjusted
later.
* Note some TODOs to complete before the PR is finished
* Extract StatusNotificationViewHolder to a new file
* Add TODO for NotificationViewData.Concrete
* Convert the adapter to take NotificationViewData.Concrete
* Add a view holder for regular status notifications
* Migrate Follow and FollowRequest notifications
* Migrate report notifications
* Convert onViewThread to use the adapter data
* Convert onViewMedia to use the adapter data
* Convert onMore to use the adapter data
* Convert onReply to use the adapter data
* Convert NotificationViewData to Kotlin
* Re-implement the reblog functionality
- Move reblogging in to the view model
- Update the UI via the adapter's `snapshot()` and `notifyItemChanged()`
methods
* Re-implement the favourite functionality
Same approach as reblog
* Re-implement the bookmark functionality
Same approach as reblog
* Add TODO re StatusActionListener interface
* Add TODO re event handling
* Re-implementing the voting functionality
* Re-implement viewing hidden content
- Hidden media
- Content behind a content warning
* Add a TODO re pinning
* Re-implement "Show more" / "Show less"
* Delete unused updateStatus() function
* Comment out the scroll listener for the moment
* Re-implement applying filters to notifications
Introduce `NotificationsRepository`, to provide access to the notifications
stream.
When changing the filters the flow is as follows:
- User clicks "Apply" in the fragment.
- Fragment calls `viewModel.accept()` with a `UiAction.ApplyFilter` (new
class).
- View model maintains a private flow of incoming UI actions. The new action
is emitted to that flow.
- In view model, `notificationFilter` waits for `.ApplyFilter` actions, and
ensures the filter is saved, then emits it.
- In view model, `pagingDataFlow` waits for new items from
`notificationsFilter` and fetches the notifications from the repository in
response. The repository provides `Notification`, so the model maps them to
`NotificationViewData.Concrete` for display by the adapter.
- In view model the UI state also waits for new items from
`notificationsFilter` and emits a new `UiState` every time the filter is
changed.
When opening the fragment for the first time:
- All of the above machinery, but `notificationFilter` also fetches the filter
from the active account and emits that first. This triggers the first fetch
and the first update of `uiState`.
Also:
- Add TODOs for functionality that is not implemented yet
- Delete a lot of dead code from NotificationsFragment
* Include important preference values in `uiState`
Listen to the flow of eventHub events, filtered to preference changes that
are relevant to the notification view.
When preferences change (or when the view model starts), fetch the current
values, and include them in `uiState`.
Remove preference handling from `NotificationsFragment`, and just use
the values from `uiState`.
Adjust how the `useAbsoluteTime` preference is handled. The previous code
loaded new content (via a diffutil) in to the adapter, which would trigger
a re-binding of the timestamp.
As the adapter content is immutable, the new code simply triggers a
re-binding of the views that are currently visible on screen.
* Update UI in response to different load states
Notifications can be loaded at the top and bottom of the timeline. Add a
new layout to show the progress of these loads, and any errors that can
occur.
Catch network errors in `NotificationsPagingSource` and convert to
`LoadState.Error`.
Add a header/footer to the notifications list to show the load state.
Collect the load state from the adapter, use this to drive the visibility
of different views.
* Save and restore the last read notification ID
Use this when fetching notifications, to centre the list around the
notification that was last read.
* Call notifyItemRangeChanged with the correct parameters
* Don't try and save list position if there are no items in the list
* Show/hide the "Nothing to see" view appropriately
* Update comments
* Handle the case where the notification key no longer exists
* Re-implement support for showMediaPreview and other settings
* Re-implement "hide FAB when scrolling" preference
* Delete dead code
* Delete Notifications Adapater and Placeholder types
* Remove NotificationViewData.Concrete subclass
Now there's no Placeholder, everything is a NotificationViewData.
* Improve how notification pages are loaded if the first notification is missing or filtered
* Re-implement clear notifications, show errors
* s/default/from/
* Add missing headers
* Don't process bookmarking via EventHub
- Initiating a bookmark is triggered by the fragment sending a
StatusUiAction.Bookmark
- View model receives this, makes API call, waits for response, emits either
a success or failure state
- Fragment collects success/failure states, updates the UI accordingly
* Don't process favourites via EventHub
* Don't process reblog via EventHub
* Don't process poll votes with EventHub
This removes EventHub from the fragment
* Respond to follow requests via the view model
* Docs and cleanup
* Typo and editing pass
* Minor edits for clarity
* Remove newline in diagram
* Reorder sequence diagram
* s/authorize/accept/
* s/pagingDataFlow/pagingData/
* Add brief KDoc
* Try and fetch a full first page of notifications
* Call the API method `notifications` again
* Log UI errors at the point of handling
* Remove unused variable
* Replace String.format() with interpolation
* Convert NotificationViewData to data class
* Rename copy() to make(), to avoid confusion with default copy() method
* Lint
* Update app/src/main/res/layout/simple_list_item_1.xml
* Update app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsPagingAdapter.kt
* Update app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsViewModel.kt
* Update app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.kt
* Update app/src/main/java/com/keylesspalace/tusky/viewdata/NotificationViewData.kt
* Initial NotificationsViewModel tests
* Add missing import
* More tests, some cleanup
* Comments, re-order some code
* Set StateRestorationPolicy.PREVENT_WHEN_EMPTY
* Mark clearNotifications() as "suspend"
* Catch exceptions from clearNotifications and emit
* Update TODOs with explanations
* Ensure initial fetch uses a null ID
* Stop/start collecting pagingData based on the lifecycle
* Don't hide the list while refreshing
* Refresh notifications on mutes and blocks
* Update tests now clearNotifications is a suspend fun
* Add "Refresh" menu to NotificationsFragment
* Use account.name over account.displayName
* Update app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.kt
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
* Mark layoutmanager as lateinit
* Mark layoutmanager as lateinit
* Refactor generating UI text
* Add Copyright header
* Correctly apply notification filters
* Show follow request header in notifications
* Wait for follow request actions to complete, so the reqeuest is sent
* Remove duplicate copyright header
* Revert copyright change in unmodified file
* Null check response body
* Move NotificationsFragment to component.notifications
* Use viewlifecycleowner.lifecyclescope
* Show notification filter as a dialog rather than a popup window
The popup window:
- Is inconsistent UI
- Requires a custom layout
- Didn't play nicely with viewbinding
* Refresh adapter on block/mute
* Scroll up slightly when new content is loaded
* Restore progressbar
* Lint
* Update app/src/main/res/layout/simple_list_item_1.xml
---------
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
2023-03-10 20:12:33 +01:00
|
|
|
testImplementation libs.truth
|
|
|
|
testImplementation libs.turbine
|
2023-10-07 19:30:11 +02:00
|
|
|
testImplementation libs.androidx.test.core.ktx
|
|
|
|
testImplementation libs.hilt.android.testing
|
|
|
|
kaptTest libs.hilt.compiler
|
2022-11-04 20:10:26 +01:00
|
|
|
|
|
|
|
androidTestImplementation libs.espresso.core
|
|
|
|
androidTestImplementation libs.androidx.room.testing
|
|
|
|
androidTestImplementation libs.androidx.test.junit
|
2023-10-07 19:30:11 +02:00
|
|
|
androidTestImplementation libs.hilt.android.testing
|
|
|
|
androidTestImplementation libs.androidx.test.core.ktx
|
2017-11-05 22:32:36 +01:00
|
|
|
}
|
Fix image zoom / pan / scroll / swipe (#3894)
Migrate to touchimageview from photoview, and adjust the touch logic to correctly handle single finger drag, two finger pinch/stretch, flings, taps, and swipes.
As before, the features are:
- Single tap, show/hide controls and media description
- Double tap, zoom in/out
- Single finger drag up/down, scale/translate image, dismiss if scrolled too far
- Single finger drag left/right
- When not zoomed, swipe to next image if multiple images present
- When zoomed, scroll to edge of image, then to next image if multiple images present
- Two finger pinch/zoom, zoom in/out on the image
Behaviour differences to previous code
1. Bug fix: The image can't get "stuck" when zoomed, and impossible to scroll
2. Bug fix: Pinching is not mis-interpreted as a fling, closing the image
3. Bug fix: The zoom state of images is not lost or misinterpreted when the user swipes through multiple images
4. Bug fix: Double-tap zooms all the way, instead of stopping
5. Tapping outside the image does not dismiss it, controls and description show/hide
Fixes https://github.com/tuskyapp/Tusky/issues/3562, https://github.com/tuskyapp/Tusky/issues/2297
2023-07-31 12:44:01 +02:00
|
|
|
|
2023-08-07 19:30:21 +02:00
|
|
|
tasks.register("newLintBaseline") {
|
|
|
|
description 'Deletes and then recreates the lint baseline'
|
|
|
|
|
|
|
|
// This task should always run, irrespective of caching
|
|
|
|
notCompatibleWithConfigurationCache("Is always out of date")
|
|
|
|
outputs.upToDateWhen { false }
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
delete android.lint.baseline.path
|
|
|
|
}
|
|
|
|
|
|
|
|
// Regenerate the lint baseline
|
|
|
|
it.finalizedBy tasks.named("lintBlueDebug")
|
|
|
|
}
|