π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove home screen badge popup stuff
laurenspriemeee35b96b45b
diff --git a/mobile/apps/photos/assets/rituals/background_rays.svg b/mobile/apps/photos/assets/rituals/background_rays.svgdeleted file mode 100644index 47c2871211..0000000000--- a/mobile/apps/photos/assets/rituals/background_rays.svg+++ /dev/null@@ -1,9 +0,0 @@-<svg width="375" height="737" viewBox="0 0 375 737" fill="none" xmlns="http://www.w3.org/2000/svg">-<path opacity="0.08" d="M187 0C207.009 0 226.713 1.30186 246.035 3.82215L187.927 449.295L360.019 34.2981C396.765 49.5363 431.066 69.482 462.169 93.3833L187.777 450.452L187.66 451.339L188.547 451.222L545.615 176.829C569.517 207.932 589.462 242.233 604.701 278.98L189.704 451.072L635.177 392.964C637.697 412.286 639 431.991 639 452C639 472.009 637.697 491.713 635.177 511.035L189.704 452.927L604.701 625.019C589.462 661.765 569.517 696.066 545.615 727.169L188.547 452.777L187.66 452.66L187.777 453.547L462.169 810.615C431.066 834.517 396.765 854.462 360.019 869.701L187.927 454.704L246.035 900.177C226.713 902.697 207.009 904 187 904C166.991 904 147.286 902.697 127.964 900.177L186.072 454.704L13.9801 869.701C-22.7665 854.462 -57.0676 834.517 -88.1706 810.615L186.222 453.547L186.339 452.66L185.452 452.777L-171.617 727.169C-195.518 696.066 -215.464 661.765 -230.702 625.019L184.295 452.927L-261.178 511.035C-263.698 491.713 -265 472.009 -265 452C-265 431.991 -263.698 412.286 -261.178 392.964L184.295 451.072L-230.702 278.98C-215.464 242.234 -195.518 207.932 -171.617 176.829L185.452 451.222L186.339 451.339L186.222 450.452L-88.1706 93.3833C-57.0677 69.4819 -22.7664 49.5363 13.9801 34.2981L186.072 449.295L127.964 3.82215C147.286 1.30175 166.991 0 187 0ZM186.953 452.581L186.938 452.617L186.967 452.578L186.953 452.581ZM187.061 452.617L187.046 452.581L187.032 452.578L187.061 452.617ZM186.765 452.231L186.767 452.234L186.769 452.23L186.765 452.231ZM187.231 452.234L187.234 452.231L187.23 452.23L187.231 452.234ZM186.382 452.061L186.418 452.046L186.421 452.032L186.382 452.061ZM187.581 452.046L187.617 452.061L187.578 452.032L187.581 452.046ZM186.421 451.967L186.418 451.953L186.382 451.938L186.421 451.967ZM187.581 451.953L187.578 451.967L187.617 451.938L187.581 451.953ZM186.765 451.767L186.769 451.769L186.767 451.765L186.765 451.767ZM187.23 451.769L187.234 451.767L187.231 451.765L187.23 451.769ZM186.953 451.418L186.967 451.421L186.938 451.382L186.953 451.418ZM187.032 451.421L187.046 451.418L187.061 451.382L187.032 451.421Z" fill="url(#paint0_radial_388_18710)"/>-<defs>-<radialGradient id="paint0_radial_388_18710" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(187 452) rotate(90) scale(452)">-<stop stop-color="#3BF43E"/>-<stop offset="0.514423" stop-color="#3BF43E" stop-opacity="0"/>-</radialGradient>-</defs>-</svg>diff --git a/mobile/apps/photos/assets/rituals/badge_popup_fidgets.svg b/mobile/apps/photos/assets/rituals/badge_popup_fidgets.svgdeleted file mode 100644index df83b54b2a..0000000000--- a/mobile/apps/photos/assets/rituals/badge_popup_fidgets.svg+++ /dev/null@@ -1,97 +0,0 @@-<svg width="546" height="186" viewBox="0 0 546 186" fill="none" xmlns="http://www.w3.org/2000/svg">-<g clip-path="url(#clip0_388_20234)">-<mask id="mask0_388_20234" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="546" height="209">-<ellipse cx="273" cy="104.5" rx="273" ry="104.5" fill="url(#paint0_radial_388_20234)"/>-</mask>-<g mask="url(#mask0_388_20234)">-<path d="M139.481 88.9449H134.382C133.781 88.9449 133.292 88.458 133.292 87.8557C133.292 87.2534 133.781 86.7664 134.382 86.7664H138.39V82.7555C138.39 82.1532 138.878 81.6662 139.479 81.6662C140.08 81.6662 140.569 82.1532 140.569 82.7555V87.8544C140.57 88.458 140.082 88.9449 139.481 88.9449Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M156.503 99.4594C156.304 99.4594 156.107 99.4056 155.935 99.3005C155.689 99.1493 155.513 98.9058 155.445 98.6264L154.25 93.671C154.109 93.0867 154.469 92.4972 155.054 92.3575C155.637 92.2101 156.226 92.5754 156.367 93.161L157.305 97.0579L161.205 96.1186C161.787 95.9738 162.377 96.3352 162.518 96.9221C162.659 97.5064 162.299 98.0959 161.715 98.2356L156.756 99.4312C156.674 99.4504 156.588 99.4594 156.503 99.4594Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M179.576 124.732C179.367 124.732 179.154 124.672 178.967 124.545C178.467 124.208 178.338 123.532 178.674 123.033L180.919 119.709L177.597 117.464C177.097 117.127 176.968 116.45 177.304 115.952C177.639 115.455 178.317 115.32 178.816 115.658L183.041 118.513C183.282 118.675 183.446 118.925 183.501 119.209C183.555 119.493 183.494 119.786 183.333 120.026L180.477 124.252C180.269 124.565 179.926 124.732 179.576 124.732Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M190.86 100.092C190.603 100.092 190.344 100.003 190.136 99.8169C189.686 99.4171 189.647 98.7277 190.048 98.2791L193.438 94.4693C193.629 94.2541 193.9 94.1221 194.189 94.1067C194.464 94.0888 194.76 94.1874 194.976 94.3809L198.783 97.7717C199.233 98.1715 199.273 98.8609 198.872 99.3094C198.471 99.758 197.781 99.7977 197.334 99.3979L194.341 96.7311L191.673 99.7272C191.457 99.9694 191.159 100.092 190.86 100.092Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M137.65 63.1055C137.444 63.1055 137.235 63.0466 137.05 62.9248L132.797 60.112C132.295 59.7801 132.158 59.1048 132.49 58.6024C132.822 58.1014 133.498 57.963 133.999 58.2949L137.345 60.508L139.557 57.1646C139.889 56.6623 140.565 56.5265 141.066 56.8571C141.569 57.189 141.706 57.8656 141.374 58.3667L138.561 62.6186C138.35 62.9338 138.004 63.1055 137.65 63.1055Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M117.693 83.5589C117.561 83.5589 117.427 83.5333 117.296 83.4833L112.547 81.6265C111.987 81.4074 111.71 80.7756 111.929 80.2143L113.786 75.4652C114.005 74.9039 114.637 74.6258 115.197 74.8475C115.757 75.0667 116.034 75.6984 115.815 76.2584L114.355 79.9926L118.089 81.4535C118.649 81.6726 118.926 82.3044 118.707 82.8657C118.54 83.2962 118.129 83.5589 117.693 83.5589Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M109.313 119.252C109.267 119.252 109.219 119.249 109.173 119.243C108.576 119.166 108.156 118.621 108.231 118.024L108.882 112.969C108.959 112.371 109.503 111.947 110.102 112.028L115.16 112.679C115.757 112.756 116.178 113.3 116.102 113.898C116.025 114.495 115.477 114.92 114.882 114.838L110.905 114.327L110.393 118.303C110.323 118.85 109.854 119.252 109.313 119.252Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M114.508 37.1699C114.364 37.1699 114.22 37.1417 114.08 37.0815L109.396 35.0747C108.844 34.8376 108.588 34.1969 108.825 33.6446L110.831 28.957C111.067 28.4034 111.707 28.1445 112.262 28.3842C112.815 28.6212 113.071 29.2607 112.834 29.8143L111.256 33.5011L114.94 35.0798C115.492 35.3169 115.748 35.9576 115.511 36.5099C115.333 36.9239 114.931 37.1699 114.508 37.1699Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M172.6 62.8979C172.463 62.8979 172.323 62.8723 172.188 62.8172C171.631 62.5891 171.363 61.9535 171.591 61.3973L173.107 57.6862L169.396 56.1702C168.839 55.9421 168.571 55.3065 168.799 54.7503C169.027 54.1929 169.663 53.9276 170.219 54.1532L174.94 56.0805C175.497 56.3086 175.765 56.9442 175.537 57.5004L173.61 62.2213C173.435 62.6416 173.029 62.8979 172.6 62.8979Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M145.083 29.6041C144.999 29.6041 144.912 29.5952 144.828 29.5747C144.243 29.435 143.883 28.8468 144.023 28.2612L145.211 23.3057C145.349 22.7214 145.931 22.36 146.523 22.501L151.481 23.6876C152.065 23.8273 152.426 24.4155 152.287 24.9998C152.147 25.5855 151.567 25.9468 150.974 25.8059L147.075 24.873L146.14 28.7686C146.021 29.2684 145.574 29.6041 145.083 29.6041Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M191.472 70.438C191.108 70.438 190.752 70.2548 190.545 69.9229C190.228 69.4116 190.385 68.7401 190.895 68.4236L194.3 66.3105L192.188 62.903C191.872 62.3917 192.029 61.7202 192.539 61.4037C193.051 61.0859 193.722 61.2448 194.04 61.7561L196.726 66.0888C197.042 66.6001 196.885 67.2703 196.375 67.5881L192.045 70.2766C191.867 70.3855 191.669 70.438 191.472 70.438Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M203.149 29.4491C203.001 29.4491 202.848 29.4183 202.701 29.3517L198.056 27.2514C197.507 27.004 197.265 26.3582 197.512 25.8097C197.758 25.2638 198.398 25.0178 198.954 25.2664L202.607 26.9182L204.259 23.2673C204.508 22.7188 205.148 22.4753 205.701 22.7239C206.249 22.9713 206.491 23.6171 206.244 24.1656L204.142 28.8083C203.961 29.212 203.566 29.4491 203.149 29.4491Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M129.055 106.757C130.126 106.757 130.995 105.889 130.995 104.817C130.995 103.746 130.126 102.877 129.055 102.877C127.983 102.877 127.115 103.746 127.115 104.817C127.115 105.889 127.983 106.757 129.055 106.757Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M116.239 68.3095C117.311 68.3095 118.18 67.4409 118.18 66.3694C118.18 65.2979 117.311 64.4292 116.239 64.4292C115.168 64.4292 114.299 65.2979 114.299 66.3694C114.299 67.4409 115.168 68.3095 116.239 68.3095Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M129.055 42.6776C130.126 42.6776 130.995 41.809 130.995 40.7375C130.995 39.666 130.126 38.7973 129.055 38.7973C127.983 38.7973 127.115 39.666 127.115 40.7375C127.115 41.809 127.983 42.6776 129.055 42.6776Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M154.687 55.4936C155.759 55.4936 156.627 54.6249 156.627 53.5534C156.627 52.4819 155.759 51.6133 154.687 51.6133C153.616 51.6133 152.747 52.4819 152.747 53.5534C152.747 54.6249 153.616 55.4936 154.687 55.4936Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M180.321 29.8617C181.392 29.8617 182.261 28.9931 182.261 27.9216C182.261 26.8501 181.392 25.9814 180.321 25.9814C179.249 25.9814 178.38 26.8501 178.38 27.9216C178.38 28.9931 179.249 29.8617 180.321 29.8617Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M193.137 42.6776C194.208 42.6776 195.077 41.809 195.077 40.7375C195.077 39.666 194.208 38.7973 193.137 38.7973C192.065 38.7973 191.197 39.666 191.197 40.7375C191.197 41.809 192.065 42.6776 193.137 42.6776Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M193.137 81.1254C194.208 81.1254 195.077 80.2568 195.077 79.1853C195.077 78.1138 194.208 77.2452 193.137 77.2452C192.065 77.2452 191.197 78.1138 191.197 79.1853C191.197 80.2568 192.065 81.1254 193.137 81.1254Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M159.191 81.6637C160.263 81.6637 161.131 80.7951 161.131 79.7236C161.131 78.652 160.263 77.7834 159.191 77.7834C158.12 77.7834 157.251 78.652 157.251 79.7236C157.251 80.7951 158.12 81.6637 159.191 81.6637Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M180.321 103.969C181.392 103.969 182.261 103.1 182.261 102.029C182.261 100.957 181.392 100.089 180.321 100.089C179.249 100.089 178.38 100.957 178.38 102.029C178.38 103.1 179.249 103.969 180.321 103.969Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M157.25 114.447C158.321 114.447 159.19 113.579 159.19 112.507C159.19 111.436 158.321 110.567 157.25 110.567C156.178 110.567 155.31 111.436 155.31 112.507C155.31 113.579 156.178 114.447 157.25 114.447Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M198.506 120.103C199.577 120.103 200.446 119.234 200.446 118.162C200.446 117.091 199.577 116.222 198.506 116.222C197.434 116.222 196.565 117.091 196.565 118.162C196.565 119.234 197.434 120.103 198.506 120.103Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M208.516 63.1837C209.587 63.1837 210.456 62.315 210.456 61.2435C210.456 60.172 209.587 59.3034 208.516 59.3034C207.444 59.3034 206.575 60.172 206.575 61.2435C206.575 62.315 207.444 63.1837 208.516 63.1837Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M131.618 127.263C132.689 127.263 133.558 126.395 133.558 125.323C133.558 124.252 132.689 123.383 131.618 123.383C130.546 123.383 129.678 124.252 129.678 125.323C129.678 126.395 130.546 127.263 131.618 127.263Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M143.65 174.106C143.444 174.106 143.235 174.047 143.05 173.925L138.797 171.112C138.295 170.78 138.157 170.105 138.489 169.602C138.821 169.101 139.498 168.963 139.999 169.295L143.345 171.508L145.557 168.165C145.889 167.662 146.565 167.526 147.066 167.857C147.569 168.189 147.706 168.866 147.374 169.367L144.561 173.619C144.35 173.934 144.004 174.106 143.65 174.106Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M123.693 194.559C123.561 194.559 123.427 194.533 123.296 194.483L118.547 192.626C117.987 192.407 117.71 191.776 117.929 191.214L119.786 186.465C120.005 185.904 120.637 185.626 121.197 185.848C121.757 186.067 122.034 186.698 121.815 187.258L120.355 190.993L124.089 192.453C124.649 192.673 124.926 193.304 124.707 193.866C124.54 194.296 124.129 194.559 123.693 194.559Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M120.508 148.17C120.364 148.17 120.22 148.142 120.08 148.081L115.396 146.075C114.844 145.838 114.588 145.197 114.825 144.645L116.831 139.957C117.067 139.403 117.707 139.145 118.262 139.384C118.815 139.621 119.071 140.261 118.834 140.814L117.256 144.501L120.94 146.08C121.492 146.317 121.748 146.958 121.511 147.51C121.333 147.924 120.931 148.17 120.508 148.17Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M178.6 173.898C178.463 173.898 178.323 173.872 178.188 173.817C177.631 173.589 177.363 172.953 177.591 172.397L179.107 168.686L175.396 167.17C174.839 166.942 174.571 166.306 174.799 165.75C175.027 165.193 175.663 164.928 176.219 165.153L180.94 167.08C181.497 167.309 181.765 167.944 181.537 168.5L179.61 173.221C179.435 173.642 179.029 173.898 178.6 173.898Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M151.083 140.604C150.999 140.604 150.912 140.595 150.828 140.575C150.243 140.435 149.883 139.847 150.023 139.261L151.211 134.306C151.349 133.721 151.931 133.36 152.523 133.501L157.481 134.688C158.065 134.827 158.426 135.415 158.287 136C158.147 136.585 157.567 136.947 156.974 136.806L153.075 135.873L152.14 139.769C152.021 140.268 151.574 140.604 151.083 140.604Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M197.472 181.438C197.108 181.438 196.752 181.255 196.545 180.923C196.228 180.412 196.385 179.74 196.895 179.424L200.3 177.31L198.188 173.903C197.872 173.392 198.029 172.72 198.539 172.404C199.051 172.086 199.722 172.245 200.04 172.756L202.726 177.089C203.042 177.6 202.885 178.27 202.375 178.588L198.045 181.277C197.867 181.386 197.669 181.438 197.472 181.438Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M209.149 140.449C209.001 140.449 208.848 140.418 208.701 140.352L204.056 138.251C203.507 138.004 203.265 137.358 203.512 136.81C203.758 136.264 204.398 136.018 204.954 136.266L208.607 137.918L210.259 134.267C210.508 133.719 211.148 133.475 211.701 133.724C212.249 133.971 212.491 134.617 212.244 135.166L210.142 139.808C209.961 140.212 209.566 140.449 209.149 140.449Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M122.239 179.31C123.311 179.31 124.18 178.441 124.18 177.369C124.18 176.298 123.311 175.429 122.239 175.429C121.168 175.429 120.299 176.298 120.299 177.369C120.299 178.441 121.168 179.31 122.239 179.31Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M135.055 153.678C136.126 153.678 136.995 152.809 136.995 151.737C136.995 150.666 136.126 149.797 135.055 149.797C133.983 149.797 133.115 150.666 133.115 151.737C133.115 152.809 133.983 153.678 135.055 153.678Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M160.687 166.494C161.759 166.494 162.627 165.625 162.627 164.553C162.627 163.482 161.759 162.613 160.687 162.613C159.616 162.613 158.747 163.482 158.747 164.553C158.747 165.625 159.616 166.494 160.687 166.494Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M186.321 140.862C187.392 140.862 188.261 139.993 188.261 138.922C188.261 137.85 187.392 136.981 186.321 136.981C185.249 136.981 184.38 137.85 184.38 138.922C184.38 139.993 185.249 140.862 186.321 140.862Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M199.137 153.678C200.208 153.678 201.077 152.809 201.077 151.737C201.077 150.666 200.208 149.797 199.137 149.797C198.065 149.797 197.197 150.666 197.197 151.737C197.197 152.809 198.065 153.678 199.137 153.678Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M214.516 174.184C215.587 174.184 216.456 173.315 216.456 172.244C216.456 171.172 215.587 170.303 214.516 170.303C213.444 170.303 212.575 171.172 212.575 172.244C212.575 173.315 213.444 174.184 214.516 174.184Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M358.025 82.9449H352.926C352.325 82.9449 351.836 82.458 351.836 81.8557C351.836 81.2534 352.325 80.7664 352.926 80.7664H356.934V76.7555C356.934 76.1532 357.422 75.6662 358.023 75.6662C358.624 75.6662 359.113 76.1532 359.113 76.7555V81.8544C359.114 82.458 358.626 82.9449 358.025 82.9449Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M375.048 93.4594C374.849 93.4594 374.652 93.4056 374.48 93.3005C374.234 93.1493 374.057 92.9058 373.989 92.6264L372.795 87.671C372.654 87.0867 373.014 86.4972 373.598 86.3575C374.181 86.2101 374.771 86.5754 374.912 87.161L375.85 91.0579L379.749 90.1186C380.331 89.9738 380.922 90.3352 381.063 90.9221C381.204 91.5064 380.844 92.0959 380.259 92.2356L375.3 93.4312C375.218 93.4504 375.132 93.4594 375.048 93.4594Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M398.12 118.732C397.911 118.732 397.699 118.672 397.511 118.545C397.012 118.208 396.882 117.532 397.218 117.033L399.463 113.709L396.142 111.464C395.642 111.127 395.512 110.45 395.848 109.952C396.184 109.455 396.862 109.32 397.36 109.658L401.585 112.513C401.826 112.675 401.99 112.925 402.045 113.209C402.099 113.493 402.039 113.786 401.877 114.026L399.021 118.252C398.813 118.565 398.47 118.732 398.12 118.732Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M409.404 94.0924C409.147 94.0924 408.888 94.0027 408.68 93.8169C408.23 93.4171 408.191 92.7277 408.592 92.2791L411.983 88.4693C412.174 88.2541 412.444 88.1221 412.734 88.1067C413.008 88.0888 413.304 88.1874 413.52 88.3809L417.328 91.7717C417.777 92.1715 417.817 92.8609 417.416 93.3094C417.015 93.758 416.326 93.7977 415.878 93.3979L412.885 90.7311L410.217 93.7272C410.001 93.9694 409.703 94.0924 409.404 94.0924Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M356.194 57.1055C355.988 57.1055 355.779 57.0466 355.595 56.9248L351.341 54.112C350.839 53.7801 350.702 53.1048 351.034 52.6024C351.366 52.1014 352.042 51.963 352.543 52.2949L355.889 54.508L358.101 51.1646C358.433 50.6623 359.11 50.5265 359.611 50.8571C360.113 51.189 360.25 51.8656 359.918 52.3667L357.105 56.6186C356.894 56.9338 356.548 57.1055 356.194 57.1055Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M336.237 77.5589C336.105 77.5589 335.971 77.5333 335.84 77.4833L331.091 75.6265C330.531 75.4074 330.254 74.7756 330.473 74.2143L332.33 69.4652C332.549 68.9039 333.181 68.6258 333.741 68.8475C334.301 69.0667 334.578 69.6984 334.358 70.2584L332.899 73.9926L336.633 75.4535C337.193 75.6726 337.47 76.3044 337.251 76.8657C337.084 77.2962 336.673 77.5589 336.237 77.5589Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M327.857 113.252C327.811 113.252 327.764 113.249 327.718 113.243C327.121 113.166 326.7 112.621 326.776 112.024L327.427 106.969C327.504 106.371 328.047 105.947 328.647 106.028L333.705 106.679C334.302 106.756 334.722 107.3 334.647 107.898C334.57 108.495 334.021 108.92 333.427 108.838L329.449 108.327L328.938 112.303C328.867 112.85 328.398 113.252 327.857 113.252Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M333.052 31.1699C332.909 31.1699 332.764 31.1417 332.624 31.0815L327.94 29.0747C327.388 28.8376 327.132 28.1969 327.369 27.6446L329.376 22.957C329.611 22.4034 330.251 22.1445 330.806 22.3842C331.359 22.6212 331.616 23.2607 331.379 23.8143L329.8 27.5011L333.484 29.0798C334.036 29.3169 334.293 29.9576 334.056 30.5099C333.877 30.9239 333.475 31.1699 333.052 31.1699Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M391.144 56.8979C391.007 56.8979 390.867 56.8723 390.732 56.8172C390.175 56.5891 389.907 55.9535 390.135 55.3973L391.651 51.6862L387.94 50.1702C387.383 49.9421 387.115 49.3065 387.343 48.7503C387.571 48.1929 388.207 47.9276 388.763 48.1532L393.484 50.0805C394.041 50.3086 394.309 50.9442 394.081 51.5004L392.153 56.2213C391.979 56.6416 391.573 56.8979 391.144 56.8979Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M363.627 23.6041C363.544 23.6041 363.457 23.5952 363.372 23.5747C362.788 23.435 362.428 22.8468 362.567 22.2612L363.755 17.3057C363.894 16.7214 364.476 16.36 365.068 16.501L370.026 17.6876C370.61 17.8273 370.97 18.4155 370.832 18.9998C370.692 19.5855 370.111 19.9468 369.518 19.8059L365.62 18.873L364.684 22.7686C364.565 23.2684 364.118 23.6041 363.627 23.6041Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M410.016 64.438C409.652 64.438 409.296 64.2548 409.09 63.9229C408.772 63.4116 408.929 62.7401 409.439 62.4236L412.844 60.3104L410.732 56.903C410.416 56.3917 410.573 55.7202 411.084 55.4037C411.595 55.0859 412.266 55.2448 412.584 55.7561L415.27 60.0887C415.587 60.6 415.429 61.2703 414.919 61.5881L410.589 64.2766C410.411 64.3855 410.213 64.438 410.016 64.438Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M421.694 23.4491C421.545 23.4491 421.393 23.4183 421.245 23.3517L416.6 21.2514C416.051 21.004 415.809 20.3582 416.057 19.8097C416.303 19.2638 416.942 19.0178 417.498 19.2664L421.152 20.9182L422.804 17.2673C423.052 16.7188 423.693 16.4753 424.245 16.7239C424.794 16.9713 425.036 17.6171 424.789 18.1656L422.687 22.8083C422.505 23.212 422.11 23.4491 421.694 23.4491Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M347.599 100.757C348.671 100.757 349.539 99.8887 349.539 98.8172C349.539 97.7457 348.671 96.877 347.599 96.877C346.528 96.877 345.659 97.7457 345.659 98.8172C345.659 99.8887 346.528 100.757 347.599 100.757Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M334.784 62.3095C335.855 62.3095 336.724 61.4409 336.724 60.3694C336.724 59.2979 335.855 58.4292 334.784 58.4292C333.712 58.4292 332.844 59.2979 332.844 60.3694C332.844 61.4409 333.712 62.3095 334.784 62.3095Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M347.599 36.6776C348.671 36.6776 349.539 35.809 349.539 34.7375C349.539 33.666 348.671 32.7973 347.599 32.7973C346.528 32.7973 345.659 33.666 345.659 34.7375C345.659 35.809 346.528 36.6776 347.599 36.6776Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M373.231 49.4936C374.303 49.4936 375.172 48.6249 375.172 47.5534C375.172 46.4819 374.303 45.6133 373.231 45.6133C372.16 45.6133 371.291 46.4819 371.291 47.5534C371.291 48.6249 372.16 49.4936 373.231 49.4936Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M398.865 23.8617C399.936 23.8617 400.805 22.9931 400.805 21.9216C400.805 20.8501 399.936 19.9814 398.865 19.9814C397.793 19.9814 396.925 20.8501 396.925 21.9216C396.925 22.9931 397.793 23.8617 398.865 23.8617Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M411.681 36.6776C412.752 36.6776 413.621 35.809 413.621 34.7375C413.621 33.666 412.752 32.7973 411.681 32.7973C410.609 32.7973 409.74 33.666 409.74 34.7375C409.74 35.809 410.609 36.6776 411.681 36.6776Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M411.681 75.1254C412.752 75.1254 413.621 74.2568 413.621 73.1853C413.621 72.1138 412.752 71.2452 411.681 71.2452C410.609 71.2452 409.74 72.1138 409.74 73.1853C409.74 74.2568 410.609 75.1254 411.681 75.1254Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M377.736 75.6637C378.807 75.6637 379.676 74.7951 379.676 73.7236C379.676 72.652 378.807 71.7834 377.736 71.7834C376.664 71.7834 375.795 72.652 375.795 73.7236C375.795 74.7951 376.664 75.6637 377.736 75.6637Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M398.865 97.9688C399.936 97.9688 400.805 97.1002 400.805 96.0287C400.805 94.9572 399.936 94.0886 398.865 94.0886C397.793 94.0886 396.925 94.9572 396.925 96.0287C396.925 97.1002 397.793 97.9688 398.865 97.9688Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M375.794 108.447C376.866 108.447 377.735 107.579 377.735 106.507C377.735 105.436 376.866 104.567 375.794 104.567C374.723 104.567 373.854 105.436 373.854 106.507C373.854 107.579 374.723 108.447 375.794 108.447Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M417.05 114.103C418.121 114.103 418.99 113.234 418.99 112.162C418.99 111.091 418.121 110.222 417.05 110.222C415.978 110.222 415.11 111.091 415.11 112.162C415.11 113.234 415.978 114.103 417.05 114.103Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M427.06 57.1837C428.131 57.1837 429 56.315 429 55.2435C429 54.172 428.131 53.3034 427.06 53.3034C425.988 53.3034 425.12 54.172 425.12 55.2435C425.12 56.315 425.988 57.1837 427.06 57.1837Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M350.162 121.263C351.234 121.263 352.102 120.395 352.102 119.323C352.102 118.252 351.234 117.383 350.162 117.383C349.091 117.383 348.222 118.252 348.222 119.323C348.222 120.395 349.091 121.263 350.162 121.263Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M368.025 190.945H362.926C362.325 190.945 361.836 190.458 361.836 189.856C361.836 189.253 362.325 188.766 362.926 188.766H366.934V184.755C366.934 184.153 367.422 183.666 368.023 183.666C368.624 183.666 369.113 184.153 369.113 184.755V189.854C369.114 190.458 368.626 190.945 368.025 190.945Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M366.194 165.106C365.988 165.106 365.779 165.047 365.595 164.925L361.341 162.112C360.839 161.78 360.702 161.105 361.034 160.602C361.366 160.101 362.042 159.963 362.543 160.295L365.889 162.508L368.101 159.165C368.433 158.662 369.11 158.526 369.611 158.857C370.113 159.189 370.25 159.866 369.918 160.367L367.105 164.619C366.894 164.934 366.548 165.106 366.194 165.106Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M346.237 185.559C346.105 185.559 345.971 185.533 345.84 185.483L341.091 183.626C340.531 183.407 340.254 182.776 340.473 182.214L342.33 177.465C342.549 176.904 343.181 176.626 343.741 176.848C344.301 177.067 344.578 177.698 344.358 178.258L342.899 181.993L346.633 183.453C347.193 183.673 347.47 184.304 347.251 184.866C347.084 185.296 346.673 185.559 346.237 185.559Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M343.052 139.17C342.909 139.17 342.764 139.142 342.624 139.081L337.94 137.075C337.388 136.838 337.132 136.197 337.369 135.645L339.376 130.957C339.611 130.403 340.251 130.145 340.806 130.384C341.359 130.621 341.616 131.261 341.379 131.814L339.8 135.501L343.484 137.08C344.036 137.317 344.293 137.958 344.056 138.51C343.877 138.924 343.475 139.17 343.052 139.17Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M401.144 164.898C401.007 164.898 400.867 164.872 400.732 164.817C400.175 164.589 399.907 163.953 400.135 163.397L401.651 159.686L397.94 158.17C397.383 157.942 397.115 157.306 397.343 156.75C397.571 156.193 398.207 155.928 398.763 156.153L403.484 158.08C404.041 158.309 404.309 158.944 404.081 159.5L402.153 164.221C401.979 164.642 401.573 164.898 401.144 164.898Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M373.627 131.604C373.544 131.604 373.457 131.595 373.372 131.575C372.788 131.435 372.428 130.847 372.567 130.261L373.755 125.306C373.894 124.721 374.476 124.36 375.068 124.501L380.026 125.688C380.61 125.827 380.97 126.415 380.832 127C380.692 127.585 380.111 127.947 379.518 127.806L375.62 126.873L374.684 130.769C374.565 131.268 374.118 131.604 373.627 131.604Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M420.016 172.438C419.652 172.438 419.296 172.255 419.09 171.923C418.772 171.412 418.929 170.74 419.439 170.424L422.844 168.31L420.732 164.903C420.416 164.392 420.573 163.72 421.084 163.404C421.595 163.086 422.266 163.245 422.584 163.756L425.27 168.089C425.587 168.6 425.429 169.27 424.919 169.588L420.589 172.277C420.411 172.386 420.213 172.438 420.016 172.438Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M431.694 131.449C431.545 131.449 431.393 131.418 431.245 131.352L426.6 129.251C426.051 129.004 425.809 128.358 426.057 127.81C426.303 127.264 426.942 127.018 427.498 127.266L431.152 128.918L432.804 125.267C433.052 124.719 433.693 124.475 434.245 124.724C434.794 124.971 435.036 125.617 434.789 126.166L432.687 130.808C432.505 131.212 432.11 131.449 431.694 131.449Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M344.784 170.31C345.855 170.31 346.724 169.441 346.724 168.369C346.724 167.298 345.855 166.429 344.784 166.429C343.712 166.429 342.844 167.298 342.844 168.369C342.844 169.441 343.712 170.31 344.784 170.31Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M357.599 144.678C358.671 144.678 359.539 143.809 359.539 142.737C359.539 141.666 358.671 140.797 357.599 140.797C356.528 140.797 355.659 141.666 355.659 142.737C355.659 143.809 356.528 144.678 357.599 144.678Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M383.231 157.494C384.303 157.494 385.172 156.625 385.172 155.553C385.172 154.482 384.303 153.613 383.231 153.613C382.16 153.613 381.291 154.482 381.291 155.553C381.291 156.625 382.16 157.494 383.231 157.494Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M408.865 131.862C409.936 131.862 410.805 130.993 410.805 129.922C410.805 128.85 409.936 127.981 408.865 127.981C407.793 127.981 406.925 128.85 406.925 129.922C406.925 130.993 407.793 131.862 408.865 131.862Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M421.681 144.678C422.752 144.678 423.621 143.809 423.621 142.737C423.621 141.666 422.752 140.797 421.681 140.797C420.609 140.797 419.74 141.666 419.74 142.737C419.74 143.809 420.609 144.678 421.681 144.678Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M421.681 183.125C422.752 183.125 423.621 182.257 423.621 181.185C423.621 180.114 422.752 179.245 421.681 179.245C420.609 179.245 419.74 180.114 419.74 181.185C419.74 182.257 420.609 183.125 421.681 183.125Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M387.736 183.664C388.807 183.664 389.676 182.795 389.676 181.724C389.676 180.652 388.807 179.783 387.736 179.783C386.664 179.783 385.795 180.652 385.795 181.724C385.795 182.795 386.664 183.664 387.736 183.664Z" fill="#08C225" fill-opacity="0.49"/>-<path d="M437.06 165.184C438.131 165.184 439 164.315 439 163.244C439 162.172 438.131 161.303 437.06 161.303C435.988 161.303 435.12 162.172 435.12 163.244C435.12 164.315 435.988 165.184 437.06 165.184Z" fill="#08C225" fill-opacity="0.49"/>-</g>-</g>-<defs>-<radialGradient id="paint0_radial_388_20234" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(273 102) rotate(90) scale(81 211.608)">-<stop stop-color="#212121"/>-<stop offset="1" stop-color="#212121" stop-opacity="0"/>-</radialGradient>-<clipPath id="clip0_388_20234">-<rect width="546" height="186" fill="white"/>-</clipPath>-</defs>-</svg>diff --git a/mobile/apps/photos/assets/rituals/green_stroke.svg b/mobile/apps/photos/assets/rituals/green_stroke.svgdeleted file mode 100644index 5250ac9c69..0000000000--- a/mobile/apps/photos/assets/rituals/green_stroke.svg+++ /dev/null@@ -1,3 +0,0 @@-<svg width="78" height="9" viewBox="0 0 78 9" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M1.50049 7.50011C15.3065 3.75654 52.3214 -3.03682 76.5005 5.94773" stroke="#08C225" stroke-width="3" stroke-linecap="round"/>-</svg>diff --git a/mobile/apps/photos/lib/models/rituals/ritual_models.dart b/mobile/apps/photos/lib/models/rituals/ritual_models.dartindex d794d74a90..d983e8edd0 100644--- a/mobile/apps/photos/lib/models/rituals/ritual_models.dart+++ b/mobile/apps/photos/lib/models/rituals/ritual_models.dart@@ -121,14 +121,12 @@ class RitualsState {final RitualsSummary? summary;final List<Ritual> rituals;final String? error;- final RitualBadgeUnlock? pendingBadge;const RitualsState({required this.loading,required this.summary,required this.rituals,required this.error,- required this.pendingBadge,});factory RitualsState.loading() => const RitualsState(@@ -136,7 +134,6 @@ class RitualsState {summary: null,rituals: [],error: null,- pendingBadge: null,);RitualsState copyWith({@@ -144,26 +141,12 @@ class RitualsState {RitualsSummary? summary,List<Ritual>? rituals,String? error,- RitualBadgeUnlock? pendingBadge,}) {return RitualsState(loading: loading ?? this.loading,summary: summary ?? this.summary,rituals: rituals ?? this.rituals,error: error,- pendingBadge: pendingBadge,);}}--class RitualBadgeUnlock {- const RitualBadgeUnlock({- required this.ritual,- required this.days,- required this.generatedAt,- });-- final Ritual ritual;- final int days;- final DateTime generatedAt;-}diff --git a/mobile/apps/photos/lib/services/rituals/rituals_service.dart b/mobile/apps/photos/lib/services/rituals/rituals_service.dartindex f0e83467b5..e0951a514a 100644--- a/mobile/apps/photos/lib/services/rituals/rituals_service.dart+++ b/mobile/apps/photos/lib/services/rituals/rituals_service.dart@@ -2,7 +2,6 @@ import "dart:async";import "dart:convert";import "dart:math";-import "package:flutter/foundation.dart";import "package:flutter/material.dart";import "package:logging/logging.dart";import "package:photos/core/configuration.dart";@@ -30,23 +29,17 @@ class RitualsService {late SharedPreferences _preferences;Timer? _debounce;StreamSubscription<FilesUpdatedEvent>? _filesUpdatedSubscription;- Map<String, Set<int>> _seenRitualBadges = {};- final Set<String> _recentlyAddedRitualIds = <String>{};static const _ritualsPrefsKey = "activity_rituals_v1";- static const _ritualBadgesPrefsKey = "activity_seen_ritual_badges_v1";- static const _badgeThresholds = [7, 14, 30];Future<void> init() async {_preferences = ServiceLocator.instance.prefs;- _seenRitualBadges = _loadSeenRitualBadges();if (!flagService.ritualsFlag) {stateNotifier.value = const RitualsState(loading: false,summary: null,rituals: [],error: null,- pendingBadge: null,);return;}@@ -80,7 +73,6 @@ class RitualsService {summary: null,rituals: [],error: null,- pendingBadge: null,);return;}@@ -88,7 +80,6 @@ class RitualsService {stateNotifier.value = stateNotifier.value.copyWith(loading: true,error: null,- pendingBadge: stateNotifier.value.pendingBadge,);final rituals = await _loadRituals();if (scheduleAllRituals) {@@ -100,21 +91,17 @@ class RitualsService {}}final summary = await _buildSummary(rituals);- final pendingBadge =- _resolvePendingBadge(rituals, summary.ritualProgress);stateNotifier.value = RitualsState(loading: false,summary: summary,rituals: rituals,error: null,- pendingBadge: pendingBadge,);} catch (e, s) {_logger.severe("Failed to refresh rituals", e, s);stateNotifier.value = stateNotifier.value.copyWith(loading: false,error: e.toString(),- pendingBadge: null,);}}@@ -234,18 +221,6 @@ class RitualsService {);}- Set<int> _normalizeBadgeSet(Set<int> seen) {- if (seen.isEmpty) return <int>{};- final valid =- seen.where((value) => _badgeThresholds.contains(value)).toSet();- if (valid.isEmpty) return <int>{};- final highest = valid.reduce(max);- return {- for (final threshold in _badgeThresholds)- if (threshold <= highest) threshold,- };- }-Future<List<Ritual>> _loadRituals() async {final raw = _preferences.getStringList(_ritualsPrefsKey) ?? [];return raw@@ -286,9 +261,6 @@ class RitualsService {} else {rituals[existingIndex] = ritual;}- if (isNew || albumChanged) {- _recentlyAddedRitualIds.add(ritual.id);- }await _persistRituals(rituals);unawaited(_scheduleRitualNotifications(ritual));@@ -300,7 +272,6 @@ class RitualsService {rituals: rituals,loading: false,error: null,- pendingBadge: stateNotifier.value.pendingBadge,);}}@@ -309,9 +280,6 @@ class RitualsService {final rituals = await _loadRituals();rituals.removeWhere((r) => r.id == id);await _persistRituals(rituals);- if (_seenRitualBadges.remove(id) != null) {- unawaited(_persistSeenRitualBadges());- }_logger.info("Clearing scheduled notifications for ritual $id (delete)");await NotificationService.instance.clearAllScheduledNotifications(containingPayload: "ritualId=$id",@@ -382,94 +350,6 @@ class RitualsService {}}- Map<String, Set<int>> _loadSeenRitualBadges() {- final raw = _preferences.getString(_ritualBadgesPrefsKey);- if (raw == null || raw.isEmpty) {- return <String, Set<int>>{};- }- try {- final decoded = jsonDecode(raw);- if (decoded is! Map) return <String, Set<int>>{};- final Map<String, Set<int>> result = {};- bool changed = false;- for (final entry in decoded.entries) {- final rawSet = Set<int>.from(- (entry.value as List<dynamic>? ?? const <int>[]).map(- (e) => (e as num).toInt(),- ),- );- final normalized = _normalizeBadgeSet(rawSet);- result[entry.key as String] = normalized;- if (!setEquals(rawSet, normalized)) {- changed = true;- }- }- if (changed) {- _seenRitualBadges = result;- unawaited(_persistSeenRitualBadges());- }- return result;- } catch (e, s) {- _logger.warning("Failed to decode ritual badge prefs", e, s);- return <String, Set<int>>{};- }- }-- Future<void> _persistSeenRitualBadges() async {- final encoded = _seenRitualBadges.map(- (key, value) => MapEntry(key, value.toList()),- );- await _preferences.setString(- _ritualBadgesPrefsKey,- jsonEncode(encoded),- );- }-- RitualBadgeUnlock? _resolvePendingBadge(- List<Ritual> rituals,- Map<String, RitualProgress> ritualProgress,- ) {- _seedSeenBadgesForNewRituals(ritualProgress);- RitualBadgeUnlock? unlock;- for (final ritual in rituals) {- final longest = ritualProgress[ritual.id]?.longestStreakOverall ?? 0;- final seen = _seenRitualBadges[ritual.id] ?? <int>{};- final newlyUnlocked = _badgeThresholds- .where((t) => longest >= t && !seen.contains(t))- .toList();- if (newlyUnlocked.isEmpty) continue;- final highest = newlyUnlocked.reduce(max);- if (unlock == null || highest > unlock.days) {- unlock = RitualBadgeUnlock(- ritual: ritual,- days: highest,- generatedAt: DateTime.now(),- );- }- }- return unlock;- }-- Future<void> markRitualBadgeSeen(String ritualId, int days) async {- final seen = _seenRitualBadges[ritualId] ?? <int>{};- final thresholdsToMark =- _badgeThresholds.where((threshold) => threshold <= days);- final updated = _normalizeBadgeSet({...seen, ...thresholdsToMark});- if (!setEquals(updated, seen)) {- _seenRitualBadges[ritualId] = updated;- await _persistSeenRitualBadges();- }- final state = stateNotifier.value;- final pending = state.pendingBadge;- if (pending != null &&- pending.ritual.id == ritualId &&- pending.days == days) {- stateNotifier.value = state.copyWith(- pendingBadge: null,- );- }- }-int _currentScheduledStreakFromDayKeys(Set<int> dayKeys,List<bool> daysOfWeek, {@@ -571,30 +451,6 @@ class RitualsService {DateTime _prevDay(DateTime day) => DateTime(day.year, day.month, day.day - 1);- void _seedSeenBadgesForNewRituals(- Map<String, RitualProgress> ritualProgress,- ) {- if (_recentlyAddedRitualIds.isEmpty) return;- bool changed = false;- for (final ritualId in _recentlyAddedRitualIds) {- final longest = ritualProgress[ritualId]?.longestStreakOverall ?? 0;- if (longest <= 0) continue;- final thresholds =- _badgeThresholds.where((threshold) => longest >= threshold);- if (thresholds.isEmpty) continue;- final seen = _seenRitualBadges[ritualId] ?? <int>{};- final updated = _normalizeBadgeSet({...seen, ...thresholds});- if (!setEquals(updated, seen)) {- _seenRitualBadges[ritualId] = updated;- changed = true;- }- }- _recentlyAddedRitualIds.clear();- if (changed) {- unawaited(_persistSeenRitualBadges());- }- }-Ritual createEmptyRitual() {return Ritual(id: newID("ritual"),diff --git a/mobile/apps/photos/lib/ui/rituals/ritual_badge_popup.dart b/mobile/apps/photos/lib/ui/rituals/ritual_badge_popup.dartdeleted file mode 100644index 371205df7f..0000000000--- a/mobile/apps/photos/lib/ui/rituals/ritual_badge_popup.dart+++ /dev/null@@ -1,738 +0,0 @@-import "dart:io";-import "dart:ui" as ui;--import "package:flutter/material.dart";-import "package:flutter/rendering.dart";-import "package:flutter_svg/flutter_svg.dart";-import "package:logging/logging.dart";-import "package:path_provider/path_provider.dart";-import "package:photos/l10n/l10n.dart";-import "package:photos/models/rituals/ritual_models.dart";-import "package:photos/theme/ente_theme.dart";-import "package:photos/utils/share_util.dart";-import "package:share_plus/share_plus.dart";--const Color _badgeGreen = Color(0xFF08C225);--const Map<int, String> _badgeAssets = {- 7: "assets/rituals/7_badge.png",- 14: "assets/rituals/14_badge.png",- 30: "assets/rituals/30_badge.png",-};--List<Color> _headingGradientColors(BuildContext context) {- final brightness = Theme.of(context).brightness;- return brightness == Brightness.dark- ? [- Colors.white.withValues(alpha: 0.92),- Colors.white.withValues(alpha: 0.72),- ]- : const [- Color(0xFF545454),- Colors.black,- ];-}--Color _raysColor(BuildContext context) {- final brightness = Theme.of(context).brightness;- return brightness == Brightness.dark- ? _badgeGreen.withValues(alpha: 0.82)- : _badgeGreen.withValues(alpha: 1.0);-}--String _badgeMessage(BuildContext context, int days) {- switch (days) {- case 7:- return context.l10n.ritualBadgeMessage7;- case 14:- return context.l10n.ritualBadgeMessage14;- case 30:- return context.l10n.ritualBadgeMessage30;- default:- return context.l10n.ritualBadgeMessageDefault;- }-}--final Logger _logger = Logger("RitualBadgePopup");--Future<void> showRitualBadgePopup(- BuildContext context, {- required RitualBadgeUnlock badge,- bool allowShare = true,-}) {- return showModalBottomSheet(- context: context,- isScrollControlled: true,- useSafeArea: false,- backgroundColor: Colors.transparent,- barrierColor: Colors.black.withValues(alpha: 0.55),- builder: (_) => _RitualBadgePopupSheet(- badge: badge,- allowShare: allowShare,- ),- );-}--class _RitualBadgePopupSheet extends StatefulWidget {- const _RitualBadgePopupSheet({- required this.badge,- required this.allowShare,- });-- final RitualBadgeUnlock badge;- final bool allowShare;-- @override- State<_RitualBadgePopupSheet> createState() => _RitualBadgePopupSheetState();-}--class _RitualBadgePopupSheetState extends State<_RitualBadgePopupSheet> {- final GlobalKey _shareButtonKey = GlobalKey();- bool _sharing = false;-- @override- Widget build(BuildContext context) {- final mediaQuery = MediaQuery.of(context);- final colorScheme = getEnteColorScheme(context);- final textTheme = getEnteTextTheme(context);- final l10n = context.l10n;- final headingGradientColors = _headingGradientColors(context);- final raysColor = _raysColor(context);- final badgeAsset = _badgeAssets[widget.badge.days] ?? _badgeAssets[7]!;- final badgeMessage = _badgeMessage(context, widget.badge.days);- final title = widget.badge.ritual.title.isEmpty- ? l10n.ritualUntitled- : widget.badge.ritual.title;- final double bottomPadding =- 16 + mediaQuery.padding.bottom.clamp(0.0, 16.0).toDouble();-- return Stack(- fit: StackFit.expand,- children: [- GestureDetector(- behavior: HitTestBehavior.opaque,- onTap: () => Navigator.of(context).pop(),- child: const SizedBox.expand(),- ),- Padding(- padding: EdgeInsets.only(- bottom: mediaQuery.viewInsets.bottom,- ),- child: Align(- alignment: Alignment.bottomCenter,- child: Container(- constraints: const BoxConstraints(maxWidth: 480),- decoration: BoxDecoration(- color: colorScheme.backgroundElevated,- borderRadius: const BorderRadius.vertical(- top: Radius.circular(22),- ),- border: Border.all(- color: colorScheme.strokeFaint,- width: 1,- ),- boxShadow: [- BoxShadow(- color: Colors.black.withValues(alpha: 0.12),- blurRadius: 24,- offset: const Offset(0, -6),- ),- ],- ),- clipBehavior: Clip.antiAlias,- child: Stack(- children: [- Positioned(- top: 6,- right: 6,- child: IconButton(- style: IconButton.styleFrom(- backgroundColor: colorScheme.fillFaint,- padding: const EdgeInsets.all(8),- shape: const CircleBorder(),- minimumSize: const Size(40, 40),- ),- onPressed: () => Navigator.of(context).pop(),- icon: Icon(- Icons.close_rounded,- color: colorScheme.textBase,- ),- ),- ),- Positioned.fill(- child: IgnorePointer(- child: Align(- alignment: Alignment.center,- child: SizedOverflowBox(- size: ui.Size.zero,- alignment: Alignment.center,- // The SVG bounds include large transparent top/bottom; mask them- // out while keeping the fidgets centered behind the badge.- child: Transform.translate(- offset: const Offset(0, -80),- child: ShaderMask(- shaderCallback: (Rect bounds) =>- const LinearGradient(- begin: Alignment.topCenter,- end: Alignment.bottomCenter,- stops: [0, 0.16, 0.84, 1],- colors: [- Colors.transparent,- Colors.white,- Colors.white,- Colors.transparent,- ],- ).createShader(bounds),- blendMode: BlendMode.dstIn,- child: SvgPicture.asset(- "assets/rituals/badge_popup_fidgets.svg",- fit: BoxFit.cover,- width: 220,- height: 220,- ),- ),- ),- ),- ),- ),- ),- Padding(- padding: EdgeInsets.fromLTRB(20, 14, 20, bottomPadding),- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- const SizedBox(height: 16),- ShaderMask(- shaderCallback: (Rect bounds) => LinearGradient(- begin: Alignment.topCenter,- end: Alignment.bottomCenter,- stops: const [0.2933, 1],- colors: headingGradientColors,- ).createShader(- Rect.fromLTWH(- 0,- 0,- bounds.width,- bounds.height,- ),- ),- blendMode: BlendMode.srcIn,- child: Text(- l10n.ritualBadgeNewTitle,- textAlign: TextAlign.center,- style: const TextStyle(- fontFamily: "Nunito",- fontStyle: FontStyle.normal,- fontSize: 24,- fontWeight: FontWeight.w900,- letterSpacing: -0.72,- height: 1.15,- decoration: TextDecoration.none,- ),- ),- ),- const SizedBox(height: 6),- SvgPicture.asset(- "assets/rituals/green_stroke.svg",- width: 74,- height: 8,- ),- const SizedBox(height: 14),- Stack(- alignment: Alignment.center,- clipBehavior: Clip.none,- children: [- SizedBox(- width: 220,- height: 240,- child: OverflowBox(- maxWidth: 900,- maxHeight: 900,- child: Transform.translate(- offset: const Offset(0, -100),- child: SvgPicture.asset(- "assets/rituals/background_rays.svg",- width: 900,- height: 900,- fit: BoxFit.contain,- colorFilter: ColorFilter.mode(- raysColor,- BlendMode.srcATop,- ),- ),- ),- ),- ),- Image.asset(- badgeAsset,- width: 184,- height: 184,- fit: BoxFit.contain,- ),- ],- ),- _RitualChip(- icon: widget.badge.ritual.icon.isEmpty- ? "πΈ"- : widget.badge.ritual.icon,- title: title,- ),- const SizedBox(height: 32),- Text(- badgeMessage,- textAlign: TextAlign.center,- style: textTheme.body.copyWith(- fontSize: 18,- height: 1.4,- ),- ),- const SizedBox(height: 36),- if (widget.allowShare)- SizedBox(- width: double.infinity,- child: ElevatedButton(- key: _shareButtonKey,- style: ElevatedButton.styleFrom(- backgroundColor: Colors.black,- foregroundColor: Colors.white,- shape: RoundedRectangleBorder(- borderRadius: BorderRadius.circular(18),- ),- padding: const EdgeInsets.symmetric(- vertical: 16,- horizontal: 12,- ),- ),- onPressed: _sharing- ? null- : () async {- setState(() {- _sharing = true;- });- try {- await shareRitualBadge(- context,- badge: widget.badge,- shareButtonKey: _shareButtonKey,- );- } finally {- if (mounted) {- setState(() {- _sharing = false;- });- }- }- },- child: Text(- _sharing- ? l10n.ritualBadgePreparing- : l10n.share,- style: textTheme.bodyBold.copyWith(- color: Colors.white,- fontSize: 16,- ),- ),- ),- ),- ],- ),- ),- ],- ),- ),- ),- ),- ],- );- }-}--class _RitualChip extends StatelessWidget {- const _RitualChip({- required this.icon,- required this.title,- this.useDarkTheme = false,- });-- final String icon;- final String title;- final bool useDarkTheme;-- @override- Widget build(BuildContext context) {- final colorScheme =- useDarkTheme ? darkTheme.colorScheme : getEnteColorScheme(context);- final textTheme =- useDarkTheme ? darkTheme.textTheme : getEnteTextTheme(context);- final brightness =- useDarkTheme ? Brightness.dark : Theme.of(context).brightness;- return DecoratedBox(- decoration: BoxDecoration(- color: brightness == Brightness.dark- ? colorScheme.backgroundElevated2- : Colors.white,- borderRadius: BorderRadius.circular(50),- border: Border.all(color: _badgeGreen, width: 2),- boxShadow: [- BoxShadow(- color: _badgeGreen.withValues(alpha: 0.18),- blurRadius: 12,- offset: const Offset(0, 6),- ),- ],- ),- child: Padding(- padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),- child: Row(- mainAxisSize: MainAxisSize.min,- children: [- CircleAvatar(- radius: 16,- backgroundColor: _badgeGreen,- child: Text(- icon,- style: const TextStyle(- fontSize: 18,- height: 1,- decoration: TextDecoration.none,- ),- ),- ),- const SizedBox(width: 10),- Text(- title,- style: textTheme.bodyBold,- ),- ],- ),- ),- );- }-}--Future<void> shareRitualBadge(- BuildContext context, {- required RitualBadgeUnlock badge,- GlobalKey? shareButtonKey,-}) async {- OverlayEntry? entry;- try {- final badgeAsset = _badgeAssets[badge.days] ?? _badgeAssets[7]!;- await _precacheBadgeAssets(badgeAsset, context);- final overlay = Overlay.maybeOf(context, rootOverlay: true);- if (overlay == null) {- throw StateError("Overlay not available for badge share");- }- final repaintKey = GlobalKey();- entry = OverlayEntry(- builder: (_) => Center(- child: Material(- type: MaterialType.transparency,- child: IgnorePointer(- child: Opacity(- // Keep the share card invisible while still allowing it to paint.- opacity: 0.01,- child: RepaintBoundary(- key: repaintKey,- child: _RitualBadgeShareCard(badge: badge),- ),- ),- ),- ),- ),- );- overlay.insert(entry);- final boundary = await _waitForBoundaryReady(repaintKey: repaintKey);- final double pixelRatio =- (MediaQuery.of(context).devicePixelRatio * 1.8).clamp(2.4, 3.5);- late final ui.Image image;- try {- image = await boundary.toImage(pixelRatio: pixelRatio);- } catch (e, s) {- _logger.warning("Badge share toImage failed", e, s);- rethrow;- }- final byteData =- await image.toByteData(format: ui.ImageByteFormat.png).catchError(- (Object e, StackTrace s) {- _logger.warning("Badge share toByteData failed", e, s);- throw e;- },- );- final data = byteData?.buffer.asUint8List();- if (data == null || data.isEmpty) {- throw StateError("Unable to encode badge image");- }- final dir = await getTemporaryDirectory();- final file = File(- "${dir.path}/ritual_badge_${badge.days}_${badge.ritual.id}_${DateTime.now().millisecondsSinceEpoch}.png",- );- await file.writeAsBytes(data, flush: true);- _logger.info(- "Sharing ritual badge for ${badge.ritual.id} (${badge.days}d); file: ${file.path}",- );- await SharePlus.instance.share(- ShareParams(- files: [XFile(file.path)],- sharePositionOrigin: shareButtonRect(context, shareButtonKey),- ),- );- } catch (e, s) {- _logger.warning("Failed to share ritual badge", e, s);- if (context.mounted) {- ScaffoldMessenger.of(context).showSnackBar(- SnackBar(- content: Text(context.l10n.ritualShareUnavailable),- ),- );- }- } finally {- entry?.remove();- }-}--Future<void> _precacheBadgeAssets(- String badgeAsset,- BuildContext context,-) async {- final providers = <ImageProvider>[- AssetImage(badgeAsset),- const AssetImage("assets/qr_logo.png"),- const AssetImage("assets/ente_io_green.png"),- ];- for (final provider in providers) {- try {- await precacheImage(provider, context);- } catch (e, s) {- _logger.fine("Failed to precache badge share asset $provider", e, s);- }- }-}--Future<RenderRepaintBoundary> _waitForBoundaryReady({- required GlobalKey repaintKey,-}) async {- const int maxAttempts = 8;- const Duration attemptDelay = Duration(milliseconds: 40);-- for (int attempt = 0; attempt < maxAttempts; attempt++) {- final boundary =- repaintKey.currentContext?.findRenderObject() as RenderRepaintBoundary?;- bool needsPaint = false;- assert(() {- needsPaint = boundary?.debugNeedsPaint ?? false;- return true;- }());- if (boundary == null) {- _logger.fine("Badge share boundary missing (attempt ${attempt + 1})");- } else if (boundary.size.isEmpty) {- _logger.fine(- "Badge share boundary has zero size (attempt ${attempt + 1})",- );- } else if (needsPaint) {- _logger.fine(- "Badge share boundary needs paint (attempt ${attempt + 1}), waiting",- );- } else {- return boundary;- }- await WidgetsBinding.instance.endOfFrame;- await Future.delayed(attemptDelay);- }-- final boundary =- repaintKey.currentContext?.findRenderObject() as RenderRepaintBoundary?;- if (boundary == null) {- throw StateError("Render boundary unavailable for badge share");- }- if (boundary.size.isEmpty) {- throw StateError("Render boundary has zero size for badge share");- }- bool needsPaint = false;- assert(() {- needsPaint = boundary.debugNeedsPaint;- return true;- }());- if (needsPaint) {- throw StateError("Render boundary not ready to paint for badge share");- }- return boundary;-}--class _RitualBadgeShareCard extends StatelessWidget {- const _RitualBadgeShareCard({required this.badge});-- final RitualBadgeUnlock badge;-- @override- Widget build(BuildContext context) {- final colorScheme = darkTheme.colorScheme;- final textTheme = darkTheme.textTheme;- final l10n = context.l10n;- final raysColor = _badgeGreen.withValues(alpha: 0.82);- final badgeAsset = _badgeAssets[badge.days] ?? _badgeAssets[7]!;- final badgeMessage = _badgeMessage(context, badge.days);- final title =- badge.ritual.title.isEmpty ? l10n.ritualUntitled : badge.ritual.title;- return Center(- child: ConstrainedBox(- constraints: const BoxConstraints(maxWidth: 480),- child: Container(- decoration: BoxDecoration(- color: colorScheme.backgroundElevated,- borderRadius: BorderRadius.circular(22),- border: Border.all(- color: colorScheme.strokeFaint,- width: 1,- ),- boxShadow: [- BoxShadow(- color: Colors.black.withValues(alpha: 0.12),- blurRadius: 24,- offset: const Offset(0, -6),- ),- ],- ),- clipBehavior: Clip.antiAlias,- child: Stack(- children: [- Positioned(- top: 6,- right: 6,- child: Image.asset(- "assets/qr_logo.png",- width: 40,- height: 40,- fit: BoxFit.contain,- ),- ),- Positioned.fill(- child: IgnorePointer(- child: Align(- alignment: Alignment.center,- child: SizedOverflowBox(- size: ui.Size.zero,- alignment: Alignment.center,- child: Transform.translate(- offset: const Offset(0, -80),- child: ShaderMask(- shaderCallback: (Rect bounds) => const LinearGradient(- begin: Alignment.topCenter,- end: Alignment.bottomCenter,- stops: [0, 0.16, 0.84, 1],- colors: [- Colors.transparent,- Colors.white,- Colors.white,- Colors.transparent,- ],- ).createShader(bounds),- blendMode: BlendMode.dstIn,- child: SvgPicture.asset(- "assets/rituals/badge_popup_fidgets.svg",- fit: BoxFit.cover,- width: 220,- height: 220,- ),- ),- ),- ),- ),- ),- ),- Padding(- padding: const EdgeInsets.fromLTRB(20, 14, 20, 20),- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- const SizedBox(height: 16),- Text(- l10n.ritualBadgeNewTitle,- textAlign: TextAlign.center,- style: TextStyle(- fontFamily: "Nunito",- fontStyle: FontStyle.normal,- fontSize: 24,- fontWeight: FontWeight.w900,- letterSpacing: -0.72,- height: 1.15,- color: colorScheme.textBase,- decoration: TextDecoration.none,- ),- ),- const SizedBox(height: 6),- SvgPicture.asset(- "assets/rituals/green_stroke.svg",- width: 74,- height: 8,- ),- const SizedBox(height: 14),- Stack(- alignment: Alignment.center,- clipBehavior: Clip.none,- children: [- SizedBox(- width: 220,- height: 240,- child: OverflowBox(- maxWidth: 900,- maxHeight: 900,- child: Transform.translate(- offset: const Offset(0, -100),- child: SvgPicture.asset(- "assets/rituals/background_rays.svg",- width: 900,- height: 900,- fit: BoxFit.contain,- colorFilter: ColorFilter.mode(- raysColor,- BlendMode.srcATop,- ),- ),- ),- ),- ),- Image.asset(- badgeAsset,- width: 184,- height: 184,- fit: BoxFit.contain,- ),- ],- ),- _RitualChip(- icon:- badge.ritual.icon.isEmpty ? "πΈ" : badge.ritual.icon,- title: title,- useDarkTheme: true,- ),- const SizedBox(height: 32),- Text(- badgeMessage,- textAlign: TextAlign.center,- style: textTheme.body.copyWith(- fontSize: 18,- height: 1.4,- color: colorScheme.textBase,- decoration: TextDecoration.none,- ),- ),- const SizedBox(height: 36),- Align(- alignment: Alignment.center,- child: Image.asset(- "assets/ente_io_green.png",- height: 16,- fit: BoxFit.contain,- ),- ),- ],- ),- ),- ],- ),- ),- ),- );- }-}diff --git a/mobile/apps/photos/lib/ui/tabs/home_widget.dart b/mobile/apps/photos/lib/ui/tabs/home_widget.dartindex ec77652845..6147205be0 100644--- a/mobile/apps/photos/lib/ui/tabs/home_widget.dart+++ b/mobile/apps/photos/lib/ui/tabs/home_widget.dart@@ -33,7 +33,6 @@ import "package:photos/l10n/l10n.dart";import "package:photos/models/collection/collection.dart";import "package:photos/models/collection/collection_items.dart";import "package:photos/models/file/file.dart";-import "package:photos/models/rituals/ritual_models.dart";import "package:photos/models/selected_albums.dart";import "package:photos/models/selected_files.dart";import "package:photos/service_locator.dart";@@ -65,7 +64,6 @@ import "package:photos/ui/home/landing_page_widget.dart";import "package:photos/ui/home/loading_photos_widget.dart";import "package:photos/ui/home/start_backup_hook_widget.dart";import "package:photos/ui/notification/update/change_log_page.dart";-import "package:photos/ui/rituals/ritual_badge_popup.dart";import "package:photos/ui/rituals/ritual_camera_page.dart";import "package:photos/ui/settings/app_update_dialog.dart";import "package:photos/ui/settings_page.dart";@@ -116,9 +114,6 @@ class _HomeWidgetState extends State<HomeWidget> {final isOnSearchTabNotifier = ValueNotifier<bool>(false);final ValueNotifier<bool> _swipeToSelectInProgressNotifier =ValueNotifier<bool>(false);- RitualBadgeUnlock? _queuedRitualBadge;- bool _showingRitualBadge = false;- late final VoidCallback _ritualsStateListener;late StreamSubscription<TabChangedEvent> _tabChangedEventSubscription;late StreamSubscription<SubscriptionPurchasedEvent>@@ -140,10 +135,6 @@ class _HomeWidgetState extends State<HomeWidget> {void initState() {_logger.info("Building initstate");super.initState();- _ritualsStateListener = () => _maybeShowRitualBadge(- ritualsService.stateNotifier.value.pendingBadge,- );- ritualsService.stateNotifier.addListener(_ritualsStateListener);if (LocalSyncService.instance.hasCompletedFirstImportOrBypassed()) {syncWidget();@@ -151,11 +142,6 @@ class _HomeWidgetState extends State<HomeWidget> {_tabChangedEventSubscription =Bus.instance.on<TabChangedEvent>().listen((event) {_selectedTabIndex = event.selectedIndex;- if (_selectedTabIndex == 0 && _queuedRitualBadge != null) {- final queued = _queuedRitualBadge;- _queuedRitualBadge = null;- _maybeShowRitualBadge(queued);- }if (event.selectedIndex == 3) {isOnSearchTabNotifier.value = true;@@ -300,12 +286,6 @@ class _HomeWidgetState extends State<HomeWidget> {.listen((inProgress) {_swipeToSelectInProgressNotifier.value = inProgress.isInProgress;});-- WidgetsBinding.instance.addPostFrameCallback((_) {- _maybeShowRitualBadge(- ritualsService.stateNotifier.value.pendingBadge,- );- });}Future<void> syncWidget() async {@@ -536,7 +516,6 @@ class _HomeWidgetState extends State<HomeWidget> {_publicAlbumLinkSubscription.cancel();_homepageSwipeToSelectInProgressEventSubscription.cancel();_swipeToSelectInProgressNotifier.dispose();- ritualsService.stateNotifier.removeListener(_ritualsStateListener);super.dispose();}@@ -910,39 +889,6 @@ class _HomeWidgetState extends State<HomeWidget> {: null;}- void _maybeShowRitualBadge(RitualBadgeUnlock? badge) {- if (!flagService.ritualsFlag) return;- if (badge == null) return;- if (_showingRitualBadge) {- _queuedRitualBadge ??= badge;- return;- }- if (_selectedTabIndex != 0) {- _queuedRitualBadge = badge;- return;- }- final badgeToShow = badge;- _queuedRitualBadge = null;- _showingRitualBadge = true;- WidgetsBinding.instance.addPostFrameCallback((_) async {- try {- await ritualsService.markRitualBadgeSeen(- badgeToShow.ritual.id,- badgeToShow.days,- );- if (!mounted) return;- await showRitualBadgePopup(- context,- badge: badgeToShow,- );- } catch (e, s) {- _logger.severe("Failed to show ritual badge popup", e, s);- } finally {- _showingRitualBadge = false;- }- });- }-Future<bool> _initDeepLinks() async {// Platform messages may fail, so we use a try/catch PlatformException.final appLinks = AppLinks();