Skip to content

Commit 5e1bff2

Browse files
authored
Merge pull request #14 from embedded-dev-research/main
merge with main
2 parents 962133d + e9313fb commit 5e1bff2

32 files changed

Lines changed: 777 additions & 207 deletions

.github/workflows/deploy-docs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Замени на master, если у тебя главная ветка называется master
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Configure Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.x
21+
22+
- name: Install dependencies
23+
run: pip install mkdocs-material
24+
25+
- name: Deploy to GitHub Pages
26+
run: mkdocs gh-deploy --force

app/lint.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
<issue id="InvalidPackage">
44
<ignore path="**/grpc-core-*.jar" />
55
</issue>
6+
<!-- Themed launcher monochrome is optional; we ship foreground-only adaptive icons. -->
7+
<issue id="MonochromeLauncherIcon" severity="ignore" />
68
</lint>
22.3 KB
Loading

app/src/main/java/com/itlab/notes/ui/NotesViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,9 @@ class NotesViewModel(
279279
directory: DirectoryItemUi,
280280
): Boolean {
281281
if (note.title.trim().isEmpty()) return false
282-
val targetFolderId = note.folderId ?: directory.id.asDomainFolderId()
283282
val existing = useCases.getNoteUseCase(note.id)
283+
if (existing == null && !canCreateNotesInDirectory(directory.id)) return false
284+
val targetFolderId = note.folderId ?: directory.id.asDomainFolderId()
284285
val result =
285286
if (existing != null) {
286287
useCases.updateNoteUseCase(existing.applyUiUpdate(note, targetFolderId))

app/src/main/java/com/itlab/notes/ui/auth/AuthViewModel.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ class AuthViewModel(
202202
shouldActivateSession = true
203203
runCatching {
204204
firebaseAuth.signInWithEmailAndPassword(trimmedEmail, password).await()
205-
clearLocalDataOnSignOut()
206205
}.onFailure { error ->
207206
shouldActivateSession = false
208207
_uiState.update {
@@ -258,7 +257,6 @@ class AuthViewModel(
258257
runCatching {
259258
val credential = GoogleAuthProvider.getCredential(idToken, null)
260259
firebaseAuth.signInWithCredential(credential).await()
261-
clearLocalDataOnSignOut()
262260
}.onFailure { error ->
263261
shouldActivateSession = false
264262
_uiState.update {

app/src/main/java/com/itlab/notes/ui/notes/DirectoryIds.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ internal fun isVirtualDirectory(directoryId: String): Boolean =
1414
directoryId == RECENT_DIRECTORY_ID ||
1515
directoryId == FAVORITES_DIRECTORY_ID
1616

17-
internal fun canCreateNotesInDirectory(directoryId: String): Boolean = directoryId != ALL_DIRECTORY_ID
17+
internal fun canCreateNotesInDirectory(directoryId: String): Boolean = !isVirtualDirectory(directoryId)

app/src/main/res/drawable/ic_launcher_background.xml

Lines changed: 0 additions & 170 deletions
This file was deleted.
Lines changed: 101 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,104 @@
1+
<!--
2+
~ Copyright (C) 2026 The Android Open Source Project
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
16+
<!--
17+
~ Copyright (C) 2026 The Android Open Source Project
18+
~
19+
~ Licensed under the Apache License, Version 2.0 (the "License");
20+
~ you may not use this file except in compliance with the License.
21+
~ You may obtain a copy of the License at
22+
~
23+
~ http://www.apache.org/licenses/LICENSE-2.0
24+
~
25+
~ Unless required by applicable law or agreed to in writing, software
26+
~ distributed under the License is distributed on an "AS IS" BASIS,
27+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28+
~ See the License for the specific language governing permissions and
29+
~ limitations under the License.
30+
-->
131
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2-
xmlns:aapt="http://schemas.android.com/aapt"
332
android:width="108dp"
433
android:height="108dp"
5-
android:viewportWidth="108"
6-
android:viewportHeight="108">
7-
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
8-
<aapt:attr name="android:fillColor">
9-
<gradient
10-
android:endX="85.84757"
11-
android:endY="92.4963"
12-
android:startX="42.9492"
13-
android:startY="49.59793"
14-
android:type="linear">
15-
<item
16-
android:color="#44000000"
17-
android:offset="0.0" />
18-
<item
19-
android:color="#00000000"
20-
android:offset="1.0" />
21-
</gradient>
22-
</aapt:attr>
23-
</path>
24-
<path
25-
android:fillColor="#FFFFFF"
26-
android:fillType="nonZero"
27-
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
28-
android:strokeWidth="1"
29-
android:strokeColor="#00000000" />
30-
</vector>
34+
android:viewportWidth="1024"
35+
android:viewportHeight="1024">
36+
<group android:scaleX="0.55"
37+
android:scaleY="0.55"
38+
android:translateX="230.4"
39+
android:translateY="230.4">
40+
<path
41+
android:pathData="M245.3,824C273.6,824 296.5,846.9 296.5,875.1C296.5,903.3 273.6,926.2 245.3,926.2C217,926.2 194.1,903.3 194.1,875.1C194.1,846.9 217,824 245.3,824ZM245.3,838.5C265.5,838.5 281.9,854.9 281.9,875.1C281.9,895.2 265.5,911.6 245.3,911.6C225.1,911.6 208.7,895.2 208.7,875.1C208.7,854.9 225.1,838.5 245.3,838.5Z"
42+
android:fillColor="#292D32"
43+
android:fillType="evenOdd"/>
44+
<path
45+
android:pathData="M781.4,824C809.6,824 832.6,846.9 832.6,875.1C832.6,903.3 809.6,926.2 781.4,926.2C753.1,926.2 730.1,903.3 730.1,875.1C730.1,846.9 753.1,824 781.4,824ZM781.4,838.5C801.6,838.5 818,854.9 818,875.1C818,895.2 801.6,911.6 781.4,911.6C761.2,911.6 744.8,895.2 744.8,875.1C744.8,854.9 761.2,838.5 781.4,838.5Z"
46+
android:fillColor="#292D32"
47+
android:fillType="evenOdd"/>
48+
<path
49+
android:pathData="M828.1,827.7H825.1V825.6H833.5V827.7H830.5V834.6H828.1V827.7Z"
50+
android:fillColor="#292D32"/>
51+
<path
52+
android:pathData="M841.3,825.6H844.9V834.6H842.5V828.2L840.6,832.4H838.6L836.7,828.3V834.6H834.3V825.6H837.9L839.6,829.4L841.3,825.6Z"
53+
android:fillColor="#292D32"/>
54+
<path
55+
android:pathData="M264.2,867.3C265.2,869.7 265.8,872.4 265.8,875.3C265.8,886.6 256.6,895.8 245.3,895.8C234,895.8 224.8,886.6 224.8,875.3C224.8,864 234,854.8 245.3,854.8C248.1,854.8 250.8,855.4 253.2,856.4C250.4,857.7 248.4,860.5 248.4,863.8C248.4,868.4 252.1,872.1 256.7,872.1C260,872.1 262.9,870.1 264.2,867.3Z"
56+
android:fillColor="#6C24F0"
57+
android:fillType="evenOdd"/>
58+
<path
59+
android:pathData="M800.2,867.3C801.3,869.7 801.9,872.4 801.9,875.3C801.9,886.6 792.7,895.8 781.4,895.8C770,895.8 760.8,886.6 760.8,875.3C760.8,864 770,854.8 781.4,854.8C784.2,854.8 786.8,855.4 789.3,856.4C786.4,857.7 784.5,860.5 784.5,863.8C784.5,868.4 788.2,872.1 792.8,872.1C796.1,872.1 799,870.1 800.2,867.3Z"
60+
android:fillColor="#6C24F0"
61+
android:fillType="evenOdd"/>
62+
<path
63+
android:pathData="M319,865C319.2,865.4 319.5,865.1 319.6,865C325.6,859 333.6,855.4 342.4,855.4C360.9,855.4 375.8,871.3 375.8,890.8C375.8,910.3 360.9,926.2 342.4,926.2C333.9,926.2 326.1,922.8 320.2,917.2C319.9,916.9 319.4,916.5 319,917V956.3H304.4V856.9H319V865ZM319,896.8V884.8C321.6,875.6 330,868.8 339.9,868.8C351.8,868.8 361.5,878.7 361.5,890.8C361.5,902.9 351.8,912.7 339.9,912.7C330,912.7 321.6,906 319,896.8Z"
64+
android:fillColor="#292D32"
65+
android:fillType="evenOdd"/>
66+
<path
67+
android:pathData="M626.1,825.6H611.4V924.8H626.1V825.6Z"
68+
android:fillColor="#292D32"/>
69+
<path
70+
android:pathData="M555.7,924.8L521.5,825.6H536.1C536.1,825.6 557.8,888.8 562.4,901.6C562.5,902.1 563,902.7 563.3,902.7C563.7,902.7 564.1,902.1 564.3,901.7C568.8,888.8 590.6,825.6 590.6,825.6H605.2L570.9,924.8H555.7Z"
71+
android:fillColor="#292D32"
72+
android:fillType="evenOdd"/>
73+
<path
74+
android:pathData="M654.5,849.9C654.5,849.6 654.7,849.6 654.7,849.6C654.7,849.6 654.9,849.6 655.1,850L705.6,924.8H721.4V825.4H706.8V899.5C706.8,899.9 706.6,899.8 706.6,899.8C706.6,899.8 706.4,899.9 706.1,899.5C697.8,887.1 656.3,825.6 656.3,825.6H639.8V924.8H654.5V849.9Z"
75+
android:fillColor="#292D32"
76+
android:fillType="evenOdd"/>
77+
<path
78+
android:pathData="M510.4,888.3V924.8H525.1V886.9C525.1,865.3 514.3,855.4 498.1,855.4C486,855.4 479.8,861.9 477.6,864.5C477.1,865.1 476.9,865.5 476.9,865.5L476.3,863.9V856.9H461.7V924.8H476.3V889C476.3,875.3 483.1,868.3 494.3,868.3C506.3,868.3 510.4,877.1 510.4,888.3Z"
79+
android:fillColor="#292D32"
80+
android:fillType="evenOdd"/>
81+
<path
82+
android:pathData="M438.7,901.3C439.9,902.1 449.4,907.5 450,907.9C444.4,918.6 434.9,926.2 418.3,926.2C396.9,926.2 382.9,910.6 382.9,891.1C382.9,871.5 398.8,855.7 418.3,855.7C434.4,855.7 453.8,865.9 453.4,896H396.9C396.9,896 396.3,896 396.2,896.3C396.2,896.5 396.3,896.9 396.4,897.3C399.1,906.8 407.9,913.8 418.3,913.8C427.2,913.8 434.9,908.7 438.7,901.3ZM438.5,883.3C438.4,883.5 438,883.5 438,883.5H397.8C397.8,883.5 397.2,883.6 397.1,883C397.1,882.7 397.3,882.3 397.5,881.8C401.1,873.8 409.1,868.3 418.3,868.3C427.9,868.3 435.4,873 438.3,882.5C438.4,882.8 438.6,883.1 438.5,883.3Z"
83+
android:fillColor="#292D32"
84+
android:fillType="evenOdd"/>
85+
<path
86+
android:pathData="M806.7,315.3V598.7C806.7,698.7 756.7,765.3 640,765.3H373.3C256.7,765.3 206.7,698.7 206.7,598.7V315.3C206.7,215.3 256.7,148.7 373.3,148.7H640C756.7,148.7 806.7,215.3 806.7,315.3Z"
87+
android:fillColor="#A9ABAD"/>
88+
<path
89+
android:pathData="M573.3,423.7H373.3C359.7,423.7 348.3,412.3 348.3,398.7C348.3,385 359.7,373.7 373.3,373.7H573.3C587,373.7 598.3,385 598.3,398.7C598.3,412.3 587,423.7 573.3,423.7Z"
90+
android:fillColor="#292D32"/>
91+
<path
92+
android:pathData="M473.3,590.3H373.3C359.7,590.3 348.3,579 348.3,565.3C348.3,551.7 359.7,540.3 373.3,540.3H473.3C487,540.3 498.3,551.7 498.3,565.3C498.3,579 487,590.3 473.3,590.3Z"
93+
android:fillColor="#292D32"/>
94+
<path
95+
android:pathData="M840,486.3C810.3,462.7 772.7,448.7 731.7,448.7C690.7,448.7 652.3,463 622.3,487.3C582,519 556.7,568.7 556.7,623.7C556.7,656.3 566,687.7 582,713.7C594.3,734 610.3,751.7 629.3,765.3C658,786.3 693.3,798.7 731.7,798.7C776,798.7 816,782.3 846.7,755C860.3,743.7 872,729.7 881.3,713.7C897.3,687.7 906.7,656.3 906.7,623.7C906.7,568 880.7,518.3 840,486.3ZM731.7,707C731.7,661 694.3,623.7 648.3,623.7C694.3,623.7 731.7,586.3 731.7,540.3C731.7,586.3 769,623.7 815,623.7C769,623.7 731.7,661 731.7,707Z"
96+
android:fillColor="#292D32"/>
97+
<path
98+
android:pathData="M640,223.7C626.3,223.7 615,212.3 615,198.7V98.7C615,85 626.3,73.7 640,73.7C653.7,73.7 665,85 665,98.7V198.7C665,212.3 653.7,223.7 640,223.7Z"
99+
android:fillColor="#292D32"/>
100+
<path
101+
android:pathData="M373.3,223.7C359.7,223.7 348.3,212.3 348.3,198.7V98.7C348.3,85 359.7,73.7 373.3,73.7C387,73.7 398.3,85 398.3,98.7V198.7C398.3,212.3 387,223.7 373.3,223.7Z"
102+
android:fillColor="#292D32"/>
103+
</group>
104+
</vector>
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
3+
<background android:drawable="@color/ic_launcher_background" />
44
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5-
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
6-
</adaptive-icon>
5+
</adaptive-icon>
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
3+
<background android:drawable="@color/ic_launcher_background" />
44
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5-
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
6-
</adaptive-icon>
5+
</adaptive-icon>

0 commit comments

Comments
 (0)