This commit is contained in:
roxy 2026-06-03 14:47:20 +08:00
parent 67baeb15f3
commit c190d95ec1
4 changed files with 43 additions and 9 deletions

View File

@ -524,7 +524,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 150;
CURRENT_PROJECT_VERSION = 160;
DEVELOPMENT_TEAM = S9YG87C297;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -533,7 +533,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.org.yumiparty;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -715,7 +715,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 150;
CURRENT_PROJECT_VERSION = 160;
DEVELOPMENT_TEAM = S9YG87C297;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -724,7 +724,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.org.yumiparty;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -744,7 +744,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 150;
CURRENT_PROJECT_VERSION = 160;
DEVELOPMENT_TEAM = S9YG87C297;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -753,7 +753,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.org.yumiparty;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -5308,8 +5308,8 @@ class RealTimeCommunicationManager extends ChangeNotifier {
return localUser.copyWith(roles: currenRoom?.entrants?.roles);
}
return localUser.copyWith(
id: _firstNonBlankText([localUser.id, responseUser.id]),
account: _firstNonBlankText([localUser.account, responseUser.account]),
id: _firstNonBlankText([responseUser.id, localUser.id]),
account: _firstNonBlankText([responseUser.account, localUser.account]),
userAvatar: _firstNonBlankText([
localUser.userAvatar,
responseUser.userAvatar,

View File

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.5.0+150
version: 1.6.0+160
environment:

View File

@ -83,4 +83,38 @@ void main() {
expect(rtcProvider.roomWheatMap[4]?.user?.id, 'user-android');
expect(rtcProvider.roomWheatMap[4]?.user?.account, 'android-account');
});
test('self go-up prefers response identity over stale local profile', () {
SharedPreferences.setMockInitialValues({});
AccountStorage().setCurrentUser(
SocialChatLoginRes(
userProfile: SocialChatUserProfile(
id: 'stale-local-id',
account: 'stale-local-account',
userNickname: 'Me',
),
),
);
final rtcProvider =
RealTimeCommunicationManager()..roomWheatMap = {5: MicRes(micIndex: 5)};
rtcProvider.debugApplySelfMicGoUpResponse(
localUser: AccountStorage().getCurrentUser()?.userProfile,
targetIndex: 5,
micGoUpRes: mic_go_up.SCMicGoUpRes(
micIndex: 5,
micMute: false,
user: mic_go_up.User(
id: 'server-seat-id',
account: 'server-seat-account',
userNickname: 'Server User',
),
),
);
expect(rtcProvider.isOnMai(), isTrue);
expect(rtcProvider.isOnMaiInIndex(5), isTrue);
expect(rtcProvider.roomWheatMap[5]?.user?.id, 'server-seat-id');
expect(rtcProvider.roomWheatMap[5]?.user?.account, 'server-seat-account');
});
}