Compare commits

..

4 Commits

Author SHA1 Message Date
Ammar Ahmed
8b9e2c8526 mobile: release v2.6.10 2023-11-20 08:44:42 +05:00
Ammar Ahmed
0dc2d14736 mobile: fix crash on pricing plans page on ios 2023-11-20 08:27:49 +05:00
Abdullah Atta
fc5dada701 editor: fix task items getting unchecked on sort 2023-11-20 08:25:27 +05:00
Abdullah Atta
f34060c4e0 editor: fix task list title getting reset 2023-11-20 08:25:27 +05:00
9 changed files with 47 additions and 29 deletions

View File

@@ -70,10 +70,11 @@ export const PricingItem = ({
<Paragraph size={SIZE.sm}>
<Heading size={SIZE.lg - 2}>
{Platform.OS === "android"
? (product.data as RNIap.SubscriptionAndroid)
? (product.data as RNIap.SubscriptionAndroid | undefined)
?.subscriptionOfferDetails[0].pricingPhases
.pricingPhaseList?.[0].formattedPrice
: (product.data as RNIap.SubscriptionIOS)?.localizedPrice}
.pricingPhaseList?.[0]?.formattedPrice
: (product.data as RNIap.SubscriptionIOS | undefined)
?.localizedPrice}
</Heading>
{product?.type === "yearly" || product?.offerType === "yearly"
? "/year"

View File

@@ -245,12 +245,12 @@ export const PricingPlans = ({
size={SIZE.lg}
>
{(Platform.OS === "android"
? (monthlyPlan?.product as RNIap.SubscriptionAndroid)
?.subscriptionOfferDetails[0].pricingPhases
.pricingPhaseList?.[0].formattedPrice
: (monthlyPlan?.product as RNIap.SubscriptionIOS)
.localizedPrice) ||
(PremiumService.getMontlySub() as any).localizedPrice}
? (monthlyPlan?.product as RNIap.SubscriptionAndroid | undefined)
?.subscriptionOfferDetails[0]?.pricingPhases
.pricingPhaseList?.[0]?.formattedPrice
: (monthlyPlan?.product as RNIap.SubscriptionIOS | undefined)
?.localizedPrice) ||
(PremiumService.getMontlySub() as any)?.localizedPrice}
/ mo
</Paragraph>
<Button
@@ -314,8 +314,8 @@ export const PricingPlans = ({
>
{Platform.OS === "android"
? (product.data as RNIap.SubscriptionAndroid)
?.subscriptionOfferDetails[1].pricingPhases
.pricingPhaseList?.[1].formattedPrice
?.subscriptionOfferDetails[1]?.pricingPhases
.pricingPhaseList?.[1]?.formattedPrice
: (product.data as RNIap.SubscriptionIOS)?.localizedPrice}
</Paragraph>{" "}
for {product.cycleText}

View File

@@ -91,7 +91,7 @@ export const Subscription = () => {
function getPrice() {
return Platform.OS === "android"
? monthlyPlan?.product?.subscriptionOfferDetails[0].pricingPhases
.pricingPhaseList?.[0].formattedPrice
.pricingPhaseList?.[0]?.formattedPrice
: monthlyPlan?.product?.localizedPrice;
}

View File

@@ -111,7 +111,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled true
versionCode 2069
versionCode 2070
versionName getNpmVersion()
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

View File

@@ -997,7 +997,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2060;
CURRENT_PROJECT_VERSION = 2061;
DEVELOPMENT_TEAM = 53CWBG3QUC;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1071,7 +1071,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.6.9;
MARKETING_VERSION = 2.6.10;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -1102,7 +1102,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2060;
CURRENT_PROJECT_VERSION = 2061;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1176,7 +1176,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.6.9;
MARKETING_VERSION = 2.6.10;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -1335,7 +1335,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2060;
CURRENT_PROJECT_VERSION = 2061;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1347,7 +1347,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.6.9;
MARKETING_VERSION = 2.6.10;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;
@@ -1378,7 +1378,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2060;
CURRENT_PROJECT_VERSION = 2061;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
@@ -1391,7 +1391,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.6.9;
MARKETING_VERSION = 2.6.10;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1421,7 +1421,7 @@
CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2060;
CURRENT_PROJECT_VERSION = 2061;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1495,7 +1495,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.6.9;
MARKETING_VERSION = 2.6.10;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
@@ -1526,7 +1526,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2060;
CURRENT_PROJECT_VERSION = 2061;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
@@ -1601,7 +1601,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.6.9;
MARKETING_VERSION = 2.6.10;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
PRODUCT_NAME = "$(TARGET_NAME)";

View File

@@ -1,6 +1,6 @@
{
"name": "@notesnook/mobile",
"version": "2.6.9",
"version": "2.6.10",
"private": true,
"license": "GPL-3.0-or-later",
"workspaces": [

View File

@@ -0,0 +1,7 @@
- Fixed HTML & PDF exports
- Improved task lists in editor
- Improved loading images
- Allow restoring backups when logged out
- Bug fixes and performance improvements
Thank you for using Notesnook!

View File

@@ -111,12 +111,14 @@ export function TaskListComponent(
if (!node) return false;
const toggleState = !node.attrs.readonly;
tr.setNodeMarkup(tr.mapping.map(parentPos), null, {
...node.attrs,
readonly: toggleState
});
node.descendants((node, pos) => {
if (node.type.name === TaskList.name) {
const actualPos = pos + parentPos + 1;
tr.setNodeMarkup(tr.mapping.map(actualPos), null, {
...node.attrs,
readonly: toggleState
});
}

View File

@@ -238,6 +238,7 @@ export const TaskListNode = TaskList.extend({
tr.doc.descendants((node, pos) => {
if (node.type.name === TaskList.name) {
tr.setNodeMarkup(pos, undefined, {
...node.attrs,
stats: countCheckedItems(node)
});
return false;
@@ -246,7 +247,7 @@ export const TaskListNode = TaskList.extend({
view.dispatch(tr);
return {};
},
appendTransaction(transactions, _oldState, newState) {
appendTransaction(transactions, oldState, newState) {
if (!transactions[0].docChanged) return;
const changedNodes = getExactChangedNodes(
@@ -270,7 +271,9 @@ export const TaskListNode = TaskList.extend({
if (
// when a task item has children, the task list is always the
// last child
edit.node.lastChild?.type.name === TaskList.name
edit.node.lastChild?.type.name === TaskList.name &&
oldState.doc.nodeAt(edit.pos)?.attrs.checked !==
newState.doc.nodeAt(edit.pos)?.attrs.checked
) {
changeCount += toggleChildren(
tr,
@@ -304,6 +307,7 @@ export const TaskListNode = TaskList.extend({
changeCount++;
tr.setNodeMarkup(tr.mapping.map(parentTaskItem.pos), undefined, {
...parentTaskItem.node.attrs,
checked: allChecked
});
childPos = parentTaskItem.pos;
@@ -318,7 +322,10 @@ export const TaskListNode = TaskList.extend({
roots.add(root);
const stats = countCheckedItems(root.node);
tr.setNodeMarkup(root.pos, undefined, { stats });
tr.setNodeMarkup(root.pos, undefined, {
...root.node.attrs,
stats
});
changeCount++;
}
}
@@ -388,6 +395,7 @@ function toggleChildren(
) {
const actualPos = pos + parentPos + 1;
tr.setNodeMarkup(tr.mapping.map(actualPos), undefined, {
...node.attrs,
checked: toggleState
});
changes++;