├── you-have-mail-android
├── app
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── java
│ │ │ │ └── dev
│ │ │ │ │ └── lbeernaert
│ │ │ │ │ └── youhavemail
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── app
│ │ │ │ │ ├── Backends.kt
│ │ │ │ │ ├── YhmInstance.kt
│ │ │ │ │ ├── StartReceiver.kt
│ │ │ │ │ ├── Logs.kt
│ │ │ │ │ ├── ActionWorker.kt
│ │ │ │ │ └── LoginSequence.kt
│ │ │ │ │ ├── ui
│ │ │ │ │ └── theme
│ │ │ │ │ │ ├── Color.kt
│ │ │ │ │ │ ├── Shape.kt
│ │ │ │ │ │ ├── Type.kt
│ │ │ │ │ │ └── Theme.kt
│ │ │ │ │ ├── components
│ │ │ │ │ ├── ActionButton.kt
│ │ │ │ │ ├── BackgroundTask.kt
│ │ │ │ │ ├── PasswordField.kt
│ │ │ │ │ └── AsyncScreen.kt
│ │ │ │ │ ├── screens
│ │ │ │ │ ├── Routes.kt
│ │ │ │ │ ├── Totp.kt
│ │ │ │ │ ├── BackendSelection.kt
│ │ │ │ │ ├── Login.kt
│ │ │ │ │ └── AccountInfo.kt
│ │ │ │ │ └── OpenAppActivity.kt
│ │ │ ├── ic_launcher-playstore.png
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_launcher_background.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_launcher_background.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_launcher_background.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ ├── ic_stat_err.png
│ │ │ │ │ ├── ic_stat_sync.png
│ │ │ │ │ └── ic_stat_alert.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ │ ├── ic_stat_err.png
│ │ │ │ │ ├── ic_stat_sync.png
│ │ │ │ │ └── ic_stat_alert.png
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ ├── ic_stat_err.png
│ │ │ │ │ ├── ic_stat_alert.png
│ │ │ │ │ └── ic_stat_sync.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_launcher_background.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_launcher_background.png
│ │ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ ├── ic_stat_alert.png
│ │ │ │ │ ├── ic_stat_err.png
│ │ │ │ │ └── ic_stat_sync.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ ├── ic_stat_err.png
│ │ │ │ │ ├── ic_stat_sync.png
│ │ │ │ │ └── ic_stat_alert.png
│ │ │ │ ├── values
│ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ ├── themes.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── strings.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── drawable
│ │ │ │ │ └── ic_base.xml
│ │ │ │ └── xml
│ │ │ │ │ ├── backup_rules.xml
│ │ │ │ │ └── data_extraction_rules.xml
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── dev
│ │ │ │ └── lbeernaert
│ │ │ │ └── youhavemail
│ │ │ │ └── ExampleUnitTest.kt
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── dev
│ │ │ └── lbeernaert
│ │ │ └── youhavemail
│ │ │ └── ExampleInstrumentedTest.kt
│ └── proguard-rules.pro
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
├── build.gradle
├── gradle.properties
├── README.md
├── gradlew.bat
└── icon_inkscape.svg
├── .gitignore
├── fastlane
└── metadata
│ └── android
│ └── en-US
│ ├── changelogs
│ ├── 15.txt
│ ├── 44.txt
│ ├── 39.txt
│ ├── 31.txt
│ ├── 43.txt
│ ├── 34.txt
│ ├── 20.txt
│ ├── 24.txt
│ ├── 14.txt
│ ├── 36.txt
│ ├── 37.txt
│ ├── 42.txt
│ ├── 30.txt
│ ├── 21.txt
│ ├── 26.txt
│ ├── 27.txt
│ ├── 41.txt
│ ├── 35.txt
│ ├── 28.txt
│ ├── 29.txt
│ ├── 23.txt
│ ├── 22.txt
│ ├── 25.txt
│ ├── 18.txt
│ ├── 38.txt
│ ├── 40.txt
│ ├── 32.txt
│ └── 33.txt
│ ├── short_description.txt
│ ├── images
│ ├── icon.png
│ └── phoneScreenshots
│ │ ├── screenshot-01.png
│ │ ├── screenshot-02.png
│ │ ├── screenshot-03.png
│ │ ├── screenshot-04.png
│ │ └── screenshot-05.png
│ └── full_description.txt
├── you-have-mail-common
├── proton
│ └── proton-api
│ │ ├── examples
│ │ ├── captcha
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ └── main.rs
│ │ └── user_id.rs
│ │ ├── src
│ │ ├── lib.rs
│ │ ├── requests
│ │ │ ├── mod.rs
│ │ │ ├── tests.rs
│ │ │ ├── user.rs
│ │ │ ├── labels.rs
│ │ │ ├── event.rs
│ │ │ └── message.rs
│ │ ├── client.rs
│ │ ├── mocks
│ │ │ ├── labels.rs
│ │ │ ├── events.rs
│ │ │ ├── mod.rs
│ │ │ └── message.rs
│ │ ├── domain
│ │ │ ├── message.rs
│ │ │ ├── mod.rs
│ │ │ ├── event.rs
│ │ │ ├── user.rs
│ │ │ ├── label.rs
│ │ │ ├── human_verification.rs
│ │ │ └── errors.rs
│ │ └── auth.rs
│ │ ├── Cargo.toml
│ │ └── tests
│ │ ├── events.rs
│ │ ├── labels.rs
│ │ ├── utils
│ │ └── mod.rs
│ │ ├── messages.rs
│ │ └── login.rs
├── youhavemail
│ ├── src
│ │ ├── v1
│ │ │ ├── mod.rs
│ │ │ └── config.rs
│ │ ├── traits.rs
│ │ ├── events.rs
│ │ ├── backend
│ │ │ ├── dummy.rs
│ │ │ └── mod.rs
│ │ ├── lib.rs
│ │ └── encryption.rs
│ ├── Cargo.toml
│ ├── tests
│ │ └── common
│ │ │ └── mod.rs
│ └── examples
│ │ └── cli.rs
└── you-have-mail-http
│ └── Cargo.toml
├── you-have-mail-mobile
├── uniffi-bindgen
│ └── uniffi-bindgen.rs
├── uniffi.toml
├── src
│ ├── lib.rs
│ ├── watcher.rs
│ ├── backend
│ │ └── mod.rs
│ ├── logging.rs
│ ├── events.rs
│ ├── account.rs
│ ├── proxy.rs
│ └── android.rs
└── Cargo.toml
├── scripts
├── build-podman.sh
├── podman-do.sh
└── build-podman-exec.sh
├── rust-toolchain.toml
├── Cargo.toml
├── .github
└── workflows
│ └── checks.yml
├── Dockerfile
└── README.md
/you-have-mail-android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | .idea
3 | /artifacts
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/15.txt:
--------------------------------------------------------------------------------
1 | * Add fastlane metadata for FDroid inclusion
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/44.txt:
--------------------------------------------------------------------------------
1 | # Changed
2 |
3 | * Updated dependencies
4 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/java/dev/lbeernaert/youhavemail/.gitignore:
--------------------------------------------------------------------------------
1 | youhavemail.kt
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/39.txt:
--------------------------------------------------------------------------------
1 | # Fix
2 |
3 | Reproducible builds for fdroid.
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/31.txt:
--------------------------------------------------------------------------------
1 | # Features
2 | * Auto fill support (Thanks @thgoebel)
3 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/43.txt:
--------------------------------------------------------------------------------
1 | # Features
2 |
3 | - Longer polling period options
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | Email Notification without Google Play Services
2 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/examples/captcha/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /Cargo.lock
3 | .idea
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/34.txt:
--------------------------------------------------------------------------------
1 | # Fixed
2 |
3 | * Register workers when boot signal is received
4 |
--------------------------------------------------------------------------------
/you-have-mail-mobile/uniffi-bindgen/uniffi-bindgen.rs:
--------------------------------------------------------------------------------
1 | fn main() {
2 | uniffi::uniffi_bindgen_main();
3 | }
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/20.txt:
--------------------------------------------------------------------------------
1 | * Changes to ensure reproducible builds between fdroid and github
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/24.txt:
--------------------------------------------------------------------------------
1 | * Fix login for Proton accounts which have both TOTP and FIDO2 as 2FA
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/14.txt:
--------------------------------------------------------------------------------
1 | * Only use Inbox Style notification when more than 1 message is available.
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/36.txt:
--------------------------------------------------------------------------------
1 | # Fixed
2 |
3 | - Fixed poll not triggering for intervals less than 15 min.
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/37.txt:
--------------------------------------------------------------------------------
1 | # Changed
2 |
3 | * Dependency updates
4 | * Improve account list update
5 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/42.txt:
--------------------------------------------------------------------------------
1 | # Changed
2 |
3 | - Replace go-srp with proton-srp
4 | - Update dependencies
5 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/30.txt:
--------------------------------------------------------------------------------
1 | # Fixes
2 |
3 | * Improve handling of session refreshes when there is no network.
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/21.txt:
--------------------------------------------------------------------------------
1 | * Auto start foreground service when Phone reboots
2 | * Clarify that Proxy settings are Optional
3 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/26.txt:
--------------------------------------------------------------------------------
1 | # Fixes
2 | * Fix account ordering after adding new account
3 |
4 | # Misc
5 | * Tweak log output
6 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/fastlane/metadata/android/en-US/images/icon.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/27.txt:
--------------------------------------------------------------------------------
1 | # Features
2 |
3 | * Improve battery life by using Android Work Manager to drive the polling of accounts.
4 |
--------------------------------------------------------------------------------
/you-have-mail-common/youhavemail/src/v1/mod.rs:
--------------------------------------------------------------------------------
1 | //! Small collection of code from the first iteration to help with porting config files.
2 | pub mod config;
3 |
--------------------------------------------------------------------------------
/scripts/build-podman.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 | #
3 | set -eou pipefail
4 |
5 | mkdir -p artifacts
6 |
7 | scripts/podman-do.sh "/opt/scripts/build-podman-exec.sh"
8 |
9 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/41.txt:
--------------------------------------------------------------------------------
1 | # Fix
2 |
3 | - Persist notification ids to avoid notification mix up.
4 | - Reduce number of database connections.
5 |
--------------------------------------------------------------------------------
/you-have-mail-android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/java/dev/lbeernaert/youhavemail/app/Backends.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail.app
2 |
3 | const val PROTON_BACKEND_NAME = "Proton Mail"
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/35.txt:
--------------------------------------------------------------------------------
1 | # Fixed
2 |
3 | * Some notifications not being delivered
4 | * Do not cancel work on startup if no change has been made to poll interval
5 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/28.txt:
--------------------------------------------------------------------------------
1 | # Features
2 |
3 | * Add support for new mail notification in custom folders which have notifications enabled for
4 | Proton Mail accounts.
5 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/29.txt:
--------------------------------------------------------------------------------
1 | # Features
2 |
3 | * Add support for 32Bit Arm CPUs
4 | * Add Refresh button to poll accounts now rather than wait for the next scheduled poll.
5 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-hdpi/ic_stat_err.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-hdpi/ic_stat_err.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-hdpi/ic_stat_sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-hdpi/ic_stat_sync.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-mdpi/ic_stat_err.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-mdpi/ic_stat_err.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-mdpi/ic_stat_sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-mdpi/ic_stat_sync.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xhdpi/ic_stat_err.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xhdpi/ic_stat_err.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/23.txt:
--------------------------------------------------------------------------------
1 | * Fix deadlock on proton account auto session refresh
2 | * Remove Proton Other Backend, no longer required with the introduction of Captcha support
3 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-hdpi/ic_stat_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-hdpi/ic_stat_alert.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-mdpi/ic_stat_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-mdpi/ic_stat_alert.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xhdpi/ic_stat_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xhdpi/ic_stat_alert.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xhdpi/ic_stat_sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xhdpi/ic_stat_sync.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xxhdpi/ic_stat_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xxhdpi/ic_stat_alert.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xxhdpi/ic_stat_err.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xxhdpi/ic_stat_err.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xxhdpi/ic_stat_sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xxhdpi/ic_stat_sync.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xxxhdpi/ic_stat_err.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xxxhdpi/ic_stat_err.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xxxhdpi/ic_stat_sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xxxhdpi/ic_stat_sync.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-01.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-02.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-03.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-04.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot-05.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable-xxxhdpi/ic_stat_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/drawable-xxxhdpi/ic_stat_alert.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #5F3DDC
4 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeanderBB/you-have-mail/HEAD/you-have-mail-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/22.txt:
--------------------------------------------------------------------------------
1 | * Feature: Handle Proton Captcha verification
2 | * Fix: Do not report Logout notification when user is logged out due to user action
3 | * Fix: Distinguish request parser error from actual network error
4 |
--------------------------------------------------------------------------------
/rust-toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | channel = "1.88.0"
3 | profile = "default"
4 | components = [ "rustfmt", "clippy" ]
5 | targets = [
6 | "aarch64-linux-android",
7 | "armv7-linux-androideabi",
8 | "x86_64-linux-android",
9 | ]
10 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/25.txt:
--------------------------------------------------------------------------------
1 | # Features
2 | * Log files: Application can now record and share logs for debugging
3 | * Password field visibility toggle
4 | * Monochrome Icon (Android 13+)
5 |
6 | # Fixes
7 | * Improve app state management
8 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/lib.rs:
--------------------------------------------------------------------------------
1 | #![allow(clippy::result_large_err)]
2 | pub mod auth;
3 | pub mod client;
4 | pub mod domain;
5 | pub mod login;
6 | pub mod requests;
7 | pub mod session;
8 |
9 | #[cfg(feature = "mocks")]
10 | pub mod mocks;
11 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/you-have-mail-android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Mar 18 11:30:03 CET 2023
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
--------------------------------------------------------------------------------
/you-have-mail-android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/java/dev/lbeernaert/youhavemail/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail.ui.theme
2 |
3 | import androidx.compose.ui.graphics.Color
4 |
5 | val Purple200 = Color(0xFFBB86FC)
6 | val Purple500 = Color(0xFF6200EE)
7 | val Purple700 = Color(0xFF3700B3)
8 | val Teal200 = Color(0xFF03DAC5)
--------------------------------------------------------------------------------
/scripts/podman-do.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 | #
3 | set -eou pipefail
4 |
5 | podman run --rm \
6 | --volume $PWD/scripts:/opt/scripts:O \
7 | --volume $PWD/artifacts:/opt/artifacts:Z \
8 | --secret android_keystore,type=mount,target=/opt/keystore \
9 | --secret android_key_pwd,type=env,target=KEY_STORE_PWD \
10 | -i -t yhm $@
11 |
12 |
--------------------------------------------------------------------------------
/you-have-mail-mobile/uniffi.toml:
--------------------------------------------------------------------------------
1 | [bindings.kotlin]
2 | package_name = "dev.lbeernaert.youhavemail"
3 | cdylib_name = "youhavemail"
4 | android_cleaner = true
5 | android = true
6 |
7 | [bindings.python]
8 | cdylib_name = "youhavemail"
9 |
10 | [bindings.ruby]
11 | cdylib_name = "youhavemail"
12 |
13 | [bindings.swift]
14 | cdylib_name = "youhavemail"
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/18.txt:
--------------------------------------------------------------------------------
1 | * Feat: Only send notifications for messages that have not
2 | been seen on other clients.
3 | * Feat: Remove Rust async runtime in favor of blocking code.
4 | Might have some benefits for battery life.
5 | * Fix: When no network is available release wake lock to allow
6 | the CPU to go into idle. Helps with battery life.
7 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/38.txt:
--------------------------------------------------------------------------------
1 | # Changed
2 |
3 | * Remember UI state when switching between landscape and veritcal views (Thanks @pangratt12345)
4 | * Add more poll intervals (Thanks @pangratt12345)
5 | * Improve poll interval drop down menu (Thanks @pangratt12345)
6 | * Check email and password input before sending request to server (Thanks @pangratt12345)
7 |
--------------------------------------------------------------------------------
/you-have-mail-mobile/src/lib.rs:
--------------------------------------------------------------------------------
1 | #![allow(clippy::module_name_repetitions)] // hard to enforce over binding layer.
2 |
3 | //! You Have Mail bindings for mobile platforms.
4 | pub mod proxy;
5 |
6 | mod account;
7 | pub mod android;
8 | pub mod backend;
9 | mod events;
10 | mod logging;
11 | mod watcher;
12 | pub mod yhm;
13 |
14 | uniffi::setup_scaffolding!();
15 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/requests/mod.rs:
--------------------------------------------------------------------------------
1 | //! Representation of all the JSON data types that need to be submitted.
2 |
3 | mod auth;
4 | mod event;
5 | mod labels;
6 | mod message;
7 | mod tests;
8 | mod user;
9 |
10 | pub use auth::*;
11 | pub use event::*;
12 | pub use labels::*;
13 | pub use message::*;
14 | pub use tests::*;
15 | pub use user::*;
16 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/requests/tests.rs:
--------------------------------------------------------------------------------
1 | use you_have_mail_http::Method;
2 |
3 | #[derive(Copy, Clone)]
4 | pub struct Ping;
5 |
6 | impl you_have_mail_http::Request for Ping {
7 | type Response = you_have_mail_http::NoResponse;
8 | const METHOD: Method = Method::Get;
9 |
10 | fn url(&self) -> String {
11 | "tests/ping".to_owned()
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/you-have-mail-mobile/src/watcher.rs:
--------------------------------------------------------------------------------
1 | use sqlite_watcher::watcher::DropRemoveTableObserverHandle;
2 |
3 | #[derive(uniffi::Object)]
4 | pub struct WatchHandle {
5 | _h: DropRemoveTableObserverHandle,
6 | }
7 |
8 | impl From for WatchHandle {
9 | fn from(value: DropRemoveTableObserverHandle) -> Self {
10 | Self { _h: value }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/examples/captcha/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "captcha"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 |
8 | [dependencies]
9 | wry = {version = "0.28"}
10 | proton-api-rs = {version ="0.10", features=["http-ureq"], path = "../../"}
11 | env_logger = "0.10"
12 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/40.txt:
--------------------------------------------------------------------------------
1 | # Added
2 |
3 | * Received messages can now be marked read, moved to trash or spam from the notification
4 |
5 | # Changed
6 |
7 | * Create individual notifications for each message and group them by account email.
8 |
9 | # Fixed
10 |
11 | * Going back in the activity history should now correctly return to the last place before opening
12 | the mail application.
13 |
--------------------------------------------------------------------------------
/you-have-mail-android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | gradlePluginPortal()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "YouHaveMail"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/java/dev/lbeernaert/youhavemail/ui/theme/Shape.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail.ui.theme
2 |
3 | import androidx.compose.foundation.shape.RoundedCornerShape
4 | import androidx.compose.material.Shapes
5 | import androidx.compose.ui.unit.dp
6 |
7 | val Shapes = Shapes(
8 | small = RoundedCornerShape(4.dp),
9 | medium = RoundedCornerShape(4.dp),
10 | large = RoundedCornerShape(0.dp)
11 | )
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/test/java/dev/lbeernaert/youhavemail/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/you-have-mail-common/you-have-mail-http/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "you-have-mail-http"
3 | authors = ["Leander Beernaert "]
4 | version = "0.1.0"
5 | edition = "2024"
6 | license = "AGPL-3.0-only"
7 |
8 | [dependencies]
9 | ureq.workspace = true
10 | secrecy.workspace = true
11 | thiserror.workspace = true
12 | serde.workspace = true
13 | serde_json.workspace = true
14 | url.workspace = true
15 | tracing.workspace = true
16 | anyhow.workspace = true
17 | http = {workspace = true}
18 |
19 | [lints.clippy]
20 | pedantic = "deny"
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/32.txt:
--------------------------------------------------------------------------------
1 | # Notice
2 |
3 | * All accounts will be in logged out state after migration
4 | to new storage format.
5 |
6 | # Changed
7 |
8 | * Removed background service and notification
9 | * Polling is now preformed by WorkManager
10 | * Account state is persisted to disk between OS reboots
11 | * Update dependencies and deprecated APIs
12 |
13 | # Fixes
14 |
15 | * Startup crash when starting service from a worker
16 | * Fix proxy screen not remembering values
17 | * Https is not a valid proxy protocol
18 |
19 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/33.txt:
--------------------------------------------------------------------------------
1 | # Notice
2 |
3 | * All accounts will be in logged out state after migration
4 | to new storage format.
5 |
6 | # Changed
7 |
8 | * Removed background service and notification
9 | * Polling is now preformed by WorkManager
10 | * Account state is persisted to disk between OS reboots
11 | * Update dependencies and deprecated APIs
12 |
13 | # Fixes
14 |
15 | * Startup crash when starting service from a worker
16 | * Fix proxy screen not remembering values
17 | * Https is not a valid proxy protocol
18 |
19 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/drawable/ic_base.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/client.rs:
--------------------------------------------------------------------------------
1 | use crate::session::DEFAULT_HOST_URL;
2 | use you_have_mail_http::{Client, ClientBuilder};
3 |
4 | pub trait ProtonExtension {
5 | /// Prepare a client builder for the default proton server.
6 | fn proton_client() -> ClientBuilder;
7 | }
8 |
9 | impl ProtonExtension for Client {
10 | fn proton_client() -> ClientBuilder {
11 | // This should never fail.
12 | let base_url = you_have_mail_http::url::Url::parse(DEFAULT_HOST_URL).unwrap();
13 | Client::builder(base_url)
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/you-have-mail-android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | compose_ui_version = '1.9.0'
4 | versions_work = "2.10.4"
5 | }
6 | }// Top-level build file where you can add configuration options common to all sub-projects/modules.
7 |
8 | plugins {
9 | id 'com.android.application' version '8.13.0' apply false
10 | id 'com.android.library' version '8.13.0' apply false
11 | id 'org.jetbrains.kotlin.android' version '2.2.20' apply false
12 | id "org.mozilla.rust-android-gradle.rust-android" version "0.9.6"
13 | id "org.jetbrains.kotlin.plugin.compose" version '2.2.20'
14 | }
--------------------------------------------------------------------------------
/you-have-mail-mobile/src/backend/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod proton;
2 |
3 | use std::sync::Arc;
4 | use you_have_mail_common as yhm;
5 |
6 | /// Represents a backend implementation.
7 | #[derive(uniffi::Object)]
8 | pub struct Backend(pub Arc);
9 |
10 | #[uniffi::export]
11 | impl Backend {
12 | /// Get the backend name.
13 | #[must_use]
14 | pub fn name(&self) -> String {
15 | self.0.name().to_owned()
16 | }
17 |
18 | /// Get a short description about this backend.
19 | #[must_use]
20 | pub fn description(&self) -> String {
21 | self.0.description().to_owned()
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/requests/user.rs:
--------------------------------------------------------------------------------
1 | use crate::domain::user::User;
2 | use serde::Deserialize;
3 | use you_have_mail_http::Method;
4 |
5 | #[derive(Deserialize)]
6 | #[serde(rename_all = "PascalCase")]
7 | pub struct GetUserInfoResponse {
8 | pub user: User,
9 | }
10 |
11 | #[derive(Copy, Clone)]
12 | pub struct GetUserInfoRequest {}
13 |
14 | impl you_have_mail_http::Request for GetUserInfoRequest {
15 | type Response = you_have_mail_http::JsonResponse;
16 | const METHOD: Method = Method::Get;
17 |
18 | fn url(&self) -> String {
19 | "core/v4/users".to_owned()
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/full_description.txt:
--------------------------------------------------------------------------------
1 | Small application to notify you when you receive an email in your email account.
2 | This may be useful for cases where you only wish to be notified when your email
3 | account has a new message and the default notification mechanism does not work
4 | (e.g: Android without Google Play Services) or do not wish to have the web
5 | interface/email client open at all times.
6 |
7 | Supported Backends
8 |
9 | The application structure has been made backend agnostics, so it should be possible to add
10 | different providers in the future. Currently, the following email providers are supported:
11 |
12 | * Proton Mail
13 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/java/dev/lbeernaert/youhavemail/components/ActionButton.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail.components
2 |
3 | import androidx.compose.foundation.layout.fillMaxWidth
4 | import androidx.compose.foundation.layout.height
5 | import androidx.compose.material.Button
6 | import androidx.compose.material.Text
7 | import androidx.compose.runtime.Composable
8 | import androidx.compose.ui.Modifier
9 | import androidx.compose.ui.unit.dp
10 |
11 | @Composable
12 | fun ActionButton(text: String, onClick: () -> Unit, enabled: Boolean = true) {
13 | Button(
14 | onClick = onClick,
15 | modifier = Modifier
16 | .fillMaxWidth()
17 | .height(50.dp),
18 | enabled = enabled,
19 | ) {
20 | Text(text = text)
21 | }
22 | }
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/mocks/labels.rs:
--------------------------------------------------------------------------------
1 | use crate::domain::label;
2 | use crate::mocks::auth::MatchExtension;
3 | use crate::requests::{GetLabelsRequest, GetLabelsResponse};
4 | use mockito::{Mock, Server};
5 | use you_have_mail_http::Request;
6 |
7 | pub fn get_labels(server: &mut Server, label_type: label::Type, labels: &[label::Label]) -> Mock {
8 | let url = GetLabelsRequest::new(label_type).url();
9 | let url = format!("/{url}?Type={}", label_type as u8);
10 | let response = GetLabelsResponse {
11 | labels: labels.to_owned(),
12 | };
13 | server
14 | .mock("GET", url.as_str())
15 | .match_auth()
16 | .with_status(200)
17 | .with_header("Content-Type", "application/json")
18 | .with_body(serde_json::to_vec(&response).unwrap())
19 | .create()
20 | }
21 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/androidTest/java/dev/lbeernaert/youhavemail/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("dev.lbeernaert.youhavemail", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/scripts/build-podman-exec.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -eou pipefail
4 |
5 | OUTPUT="/opt/artifacts/app-signed.apk"
6 | ALIGNED="/tmp/app-aligned.apk"
7 |
8 | source ~/.cargo/env
9 |
10 | echo "Cloning repo"
11 | git clone "https://github.com/LeanderBB/you-have-mail.git" /opt/project
12 |
13 | cd /opt/project/you-have-mail-android
14 |
15 | # Build Project
16 | ./gradlew --no-daemon assembleRelease
17 |
18 | # Align zip
19 | echo "Aligning apk"
20 | $ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/zipalign -v 4 \
21 | app/build/outputs/apk/release/app-release-unsigned.apk $ALIGNED
22 |
23 | # Sign apk
24 | echo "Signing apk"
25 | echo $KEY_STORE_PWD | $ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/apksigner sign \
26 | --ks /opt/keystore \
27 | --in $ALIGNED \
28 | --out $OUTPUT
29 |
30 | # Verify
31 | echo "Verifying apk"
32 | $ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/apksigner verify $OUTPUT
33 |
34 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/domain/message.rs:
--------------------------------------------------------------------------------
1 | use crate::domain::Boolean;
2 | use crate::domain::label::Id as LabelId;
3 | use serde::{Deserialize, Serialize};
4 | use std::fmt::{Display, Formatter};
5 |
6 | /// Message API ID.
7 | #[derive(Debug, Deserialize, Serialize, Eq, PartialEq, Hash, Clone)]
8 | pub struct Id(pub String);
9 |
10 | impl Display for Id {
11 | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
12 | self.0.fmt(f)
13 | }
14 | }
15 |
16 | /// Represents an email message.
17 | #[derive(Debug, Deserialize, Eq, PartialEq, Clone)]
18 | #[cfg_attr(feature = "mocks", derive(Serialize))]
19 | #[serde(rename_all = "PascalCase")]
20 | pub struct Message {
21 | #[serde(rename = "ID")]
22 | pub id: Id,
23 | #[serde(rename = "LabelIDs")]
24 | pub labels: Vec,
25 | pub subject: String,
26 | pub sender_address: String,
27 | pub sender_name: Option,
28 | pub unread: Boolean,
29 | }
30 |
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/java/dev/lbeernaert/youhavemail/components/BackgroundTask.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail.components
2 |
3 | import androidx.compose.foundation.layout.*
4 | import androidx.compose.material.CircularProgressIndicator
5 | import androidx.compose.material.Text
6 | import androidx.compose.runtime.Composable
7 | import androidx.compose.ui.Alignment
8 | import androidx.compose.ui.Modifier
9 | import androidx.compose.ui.res.stringResource
10 | import androidx.compose.ui.unit.dp
11 | import dev.lbeernaert.youhavemail.R
12 |
13 | @Composable
14 | fun BackgroundTask(text: String) {
15 | Column(
16 | modifier = Modifier
17 | .padding(10.dp)
18 | .fillMaxSize(),
19 | verticalArrangement = Arrangement.Center,
20 | horizontalAlignment = Alignment.CenterHorizontally,
21 |
22 | ) {
23 | CircularProgressIndicator()
24 | Spacer(modifier = Modifier.padding(10.dp))
25 | Text(text = text)
26 | }
27 | }
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "proton-api"
3 | authors = ["Leander Beernaert "]
4 | version = "0.16.0"
5 | edition = "2024"
6 | license = "AGPL-3.0-only"
7 |
8 | [dependencies]
9 | thiserror.workspace = true
10 | serde.workspace = true
11 | serde_repr.workspace = true
12 | serde_json.workspace = true
13 | secrecy.workspace = true
14 | parking_lot.workspace = true
15 | tracing.workspace = true
16 | anyhow.workspace = true
17 | proton-srp = {git = "https://github.com/ProtonMail/proton-crypto-rs.git", rev="8a66aeb7e90d6f86bbe2fe74546876ffe748cd30"}
18 | you-have-mail-http = { path = "../../you-have-mail-http" }
19 | mockito = { version = "1.7.0", optional = true }
20 |
21 |
22 | [features]
23 | default = []
24 | mocks = ["mockito"]
25 |
26 | [dev-dependencies]
27 | url.workspace = true
28 | tracing-subscriber.workspace = true
29 | proton-api = { path = ".", features = ["mocks"] }
30 |
31 | [[example]]
32 | name = "user_id"
33 |
34 | [lints.clippy]
35 | pedantic = "deny"
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/java/dev/lbeernaert/youhavemail/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail.ui.theme
2 |
3 | import androidx.compose.material.Typography
4 | import androidx.compose.ui.text.TextStyle
5 | import androidx.compose.ui.text.font.FontFamily
6 | import androidx.compose.ui.text.font.FontWeight
7 | import androidx.compose.ui.unit.sp
8 |
9 | // Set of Material typography styles to start with
10 | val Typography = Typography(
11 | body1 = TextStyle(
12 | fontFamily = FontFamily.Default,
13 | fontWeight = FontWeight.Normal,
14 | fontSize = 16.sp
15 | )
16 | /* Other default text styles to override
17 | button = TextStyle(
18 | fontFamily = FontFamily.Default,
19 | fontWeight = FontWeight.W500,
20 | fontSize = 14.sp
21 | ),
22 | caption = TextStyle(
23 | fontFamily = FontFamily.Default,
24 | fontWeight = FontWeight.Normal,
25 | fontSize = 12.sp
26 | )
27 | */
28 | )
--------------------------------------------------------------------------------
/you-have-mail-android/app/src/main/java/dev/lbeernaert/youhavemail/app/YhmInstance.kt:
--------------------------------------------------------------------------------
1 | package dev.lbeernaert.youhavemail.app
2 |
3 | import android.content.Context
4 | import dev.lbeernaert.youhavemail.Yhm
5 |
6 | /**
7 | * Yhm Singleton.
8 | */
9 | class YhmInstance private constructor(var yhm: Yhm) {
10 | companion object {
11 | @Volatile
12 | private var instance: YhmInstance? = null
13 |
14 | /**
15 | * Get or create a Yhm instance.
16 | *
17 | * Throws exception on failure.
18 | */
19 | fun get(context: Context): YhmInstance {
20 | if (instance != null) {
21 | return instance!!
22 | }
23 | synchronized(this) {
24 | if (instance == null) {
25 | val key = getOrCreateEncryptionKey(context)
26 | val dbPath = getDatabasePath(context)
27 | instance = YhmInstance(Yhm(dbPath, encryptionKey = key))
28 | }
29 |
30 | return instance!!
31 | }
32 | }
33 | }
34 |
35 |
36 | }
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/mocks/events.rs:
--------------------------------------------------------------------------------
1 | use crate::domain::event;
2 | use crate::mocks::auth::MatchExtension;
3 | use crate::requests::{GetEventRequest, GetLatestEventResponse};
4 | use mockito::{Mock, Server};
5 | use you_have_mail_http::Request;
6 |
7 | /// Mock get latest event request.
8 | pub fn get_latest_event_id(server: &mut Server, event_id: event::Id) -> Mock {
9 | server
10 | .mock("GET", "/core/v4/events/latest")
11 | .match_auth()
12 | .with_status(200)
13 | .with_header("Content-Type", "application/json")
14 | .with_body(serde_json::to_vec(&GetLatestEventResponse { event_id }).unwrap())
15 | .create()
16 | }
17 |
18 | /// Mock get event by `event_id`.
19 | pub fn get_event(server: &mut Server, event_id: &event::Id, event: &event::Event) -> Mock {
20 | let url = GetEventRequest::new(event_id).url();
21 | let url = format!("/{url}");
22 | server
23 | .mock("GET", url.as_str())
24 | .match_auth()
25 | .with_status(200)
26 | .with_body(serde_json::to_vec(event).unwrap())
27 | .create()
28 | }
29 |
--------------------------------------------------------------------------------
/you-have-mail-common/proton/proton-api/src/requests/labels.rs:
--------------------------------------------------------------------------------
1 | use crate::domain::label::{Label, Type};
2 | use serde::Deserialize;
3 | use you_have_mail_http::{Method, RequestBuilder};
4 |
5 | #[derive(Copy, Clone)]
6 | pub struct GetLabelsRequest {
7 | label_type: Type,
8 | }
9 |
10 | #[doc(hidden)]
11 | #[derive(Deserialize)]
12 | #[cfg_attr(feature = "mocks", derive(serde::Serialize))]
13 | pub struct GetLabelsResponse {
14 | #[serde(rename = "Labels")]
15 | pub labels: Vec