Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
ec5db404
Commit
ec5db404
authored
6 months ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Import RLV inventory fix from FS
parent
da23823c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llaisapi.cpp
+18
-0
18 additions, 0 deletions
indra/newview/llaisapi.cpp
indra/newview/llversioninfo.cpp
+1
-1
1 addition, 1 deletion
indra/newview/llversioninfo.cpp
indra/newview/rlvinventory.cpp
+22
-41
22 additions, 41 deletions
indra/newview/rlvinventory.cpp
with
41 additions
and
42 deletions
indra/newview/llaisapi.cpp
+
18
−
0
View file @
ec5db404
...
...
@@ -979,6 +979,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
id
=
result
[
"linked_id"
];
}
break
;
case
COPYINVENTORY
:
case
CREATEINVENTORY
:
// CREATEINVENTORY can have multiple callbacks
if
(
result
.
has
(
"_created_categories"
))
...
...
@@ -1004,6 +1005,23 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
}
}
break
;
case
UPDATECATEGORY
:
if
(
result
.
has
(
"_updated_categories"
))
{
LLSD
&
items
=
result
[
"_updated_categories"
];
LLSD
::
array_const_iterator
item_iter
;
for
(
item_iter
=
items
.
beginArray
();
item_iter
!=
items
.
endArray
();
++
item_iter
)
{
LLUUID
item_id
=
*
item_iter
;
callback
(
item_id
);
needs_callback
=
false
;
}
}
else
if
(
result
.
has
(
"category_id"
))
{
id
=
result
[
"category_id"
];
}
break
;
default
:
break
;
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llversioninfo.cpp
+
1
−
1
View file @
ec5db404
...
...
@@ -189,7 +189,7 @@ bool LLVersionInfo::isViewerExpired()
static
const
U64
BUILD_TIME
(
UNIX_TIMESTAMP
);
static
const
U64Seconds
TEST_EXPIREY
(
BUILD_TIME
+
((
60
*
60
)
*
24
*
30
));
// 30 days
static
const
U64Seconds
PROJECT_EXPIREY
(
BUILD_TIME
+
((
60
*
60
)
*
24
*
60
));
// 60 days
static
const
U64Seconds
BETA_EXPIREY
(
BUILD_TIME
+
((
60
*
60
)
*
24
*
120
));
//
9
0 days
static
const
U64Seconds
BETA_EXPIREY
(
BUILD_TIME
+
((
60
*
60
)
*
24
*
120
));
//
12
0 days
switch
(
getViewerMaturity
())
{
...
...
This diff is collapsed.
Click to expand it.
indra/newview/rlvinventory.cpp
+
22
−
41
View file @
ec5db404
...
...
@@ -100,9 +100,9 @@ void RlvInventory::fetchSharedInventory()
// Add them to the "to fetch" list
uuid_vec_t
idFolders
;
idFolders
.
push
_back
(
pRlvRoot
->
getUUID
());
for
(
S32
idxFolder
=
0
,
cntFolder
=
folders
.
size
();
idxFolder
<
cntFolder
;
idxFolder
++
)
idFolders
.
push
_back
(
folders
.
at
(
idxFolder
)
->
getUUID
());
idFolders
.
emplace
_back
(
pRlvRoot
->
getUUID
());
for
(
size_t
idxFolder
=
0
,
cntFolder
=
folders
.
size
();
idxFolder
<
cntFolder
;
idxFolder
++
)
idFolders
.
emplace
_back
(
folders
.
at
(
idxFolder
)
->
getUUID
());
// Now fetch them all in one go
RlvSharedInventoryFetcher
*
pFetcher
=
new
RlvSharedInventoryFetcher
(
idFolders
);
...
...
@@ -131,7 +131,7 @@ void RlvInventory::fetchSharedLinks()
// Add them to the "to fetch" list based on link type
uuid_vec_t
idFolders
,
idItems
;
for
(
S32
idxItem
=
0
,
cntItem
=
items
.
size
();
idxItem
<
cntItem
;
idxItem
++
)
for
(
size_t
idxItem
=
0
,
cntItem
=
items
.
size
();
idxItem
<
cntItem
;
idxItem
++
)
{
const
LLViewerInventoryItem
*
pItem
=
items
.
at
(
idxItem
);
switch
(
pItem
->
getActualType
())
...
...
@@ -244,7 +244,7 @@ const LLUUID& RlvInventory::getSharedRootID() const
{
// NOTE: we might have multiple #RLV folders (pick the first one with sub-folders; otherwise the last one with no sub-folders)
const
LLViewerInventoryCategory
*
pFolder
;
for
(
S32
idxFolder
=
0
,
cntFolder
=
pFolders
->
size
();
idxFolder
<
cntFolder
;
idxFolder
++
)
for
(
size_t
idxFolder
=
0
,
cntFolder
=
pFolders
->
size
();
idxFolder
<
cntFolder
;
idxFolder
++
)
{
if
(
((
pFolder
=
pFolders
->
at
(
idxFolder
))
!=
NULL
)
&&
(
cstrSharedRoot
==
pFolder
->
getName
())
)
{
...
...
@@ -354,7 +354,7 @@ S32 RlvInventory::getDirectDescendentsItemCount(const LLInventoryCategory* pFold
if
(
pItems
)
{
for
(
S32
idxItem
=
0
,
cntItem
=
pItems
->
size
();
idxItem
<
cntItem
;
idxItem
++
)
for
(
size_t
idxItem
=
0
,
cntItem
=
pItems
->
size
();
idxItem
<
cntItem
;
idxItem
++
)
if
(
pItems
->
at
(
idxItem
)
->
getType
()
==
filterType
)
cntType
++
;
}
...
...
@@ -430,7 +430,7 @@ void RlvRenameOnWearObserver::doneIdle()
continue
;
}
for
(
S32
idxItem
=
0
,
cntItem
=
items
.
size
();
idxItem
<
cntItem
;
idxItem
++
)
for
(
size_t
idxItem
=
0
,
cntItem
=
items
.
size
();
idxItem
<
cntItem
;
idxItem
++
)
{
LLViewerInventoryItem
*
pItem
=
items
.
at
(
idxItem
);
if
(
!
pItem
)
...
...
@@ -572,42 +572,24 @@ void RlvGiveToRLVOffer::moveAndRename(const LLUUID& idFolder, const LLUUID& idDe
const
LLViewerInventoryCategory
*
pFolder
=
gInventory
.
getCategory
(
idFolder
);
if
(
(
idDestination
.
notNull
())
&&
(
pFolder
)
)
{
bool
needsRename
=
(
pFolder
->
getName
()
!=
strName
);
LLPointer
<
LLInventoryCallback
>
cbMove
;
if
(
idDestination
!=
pFolder
->
getParentUUID
())
gInventory
.
changeCategoryParent
(
gInventory
.
getCategory
(
idFolder
),
idDestination
,
false
);
gInventory
.
addChangedMask
(
LLInventoryObserver
::
STRUCTURE
,
idFolder
);
gInventory
.
notifyObservers
();
gInventory
.
fetchDescendentsOf
(
idDestination
);
// rename and restart this function if the folder doesn't have the correct name.
// This will also trigger another move above, but that should have no ill effects
// and might even help when the folder didn't move correctly the first time. -Zi
if
(
pFolder
->
getName
()
!=
strName
)
{
// We have to move *after* the rename operation completes or AIS will drop it
if
(
!
needsRename
)
{
LLInventoryModel
::
update_list_t
update
;
LLInventoryModel
::
LLCategoryUpdate
updOldParent
(
pFolder
->
getParentUUID
(),
-
1
);
update
.
push_back
(
updOldParent
);
LLInventoryModel
::
LLCategoryUpdate
updNewParent
(
idDestination
,
1
);
update
.
push_back
(
updNewParent
);
gInventory
.
accountForUpdate
(
update
);
LLPointer
<
LLViewerInventoryCategory
>
pNewFolder
=
new
LLViewerInventoryCategory
(
pFolder
);
pNewFolder
->
setParent
(
idDestination
);
pNewFolder
->
updateParentOnServer
(
FALSE
);
gInventory
.
updateCategory
(
pNewFolder
);
gInventory
.
notifyObservers
();
if
(
cbFinal
)
{
cbFinal
.
get
()
->
fire
(
idFolder
);
}
}
else
{
cbMove
=
new
LLBoostFuncInventoryCallback
(
boost
::
bind
(
RlvGiveToRLVOffer
::
moveAndRename
,
_1
,
idDestination
,
strName
,
cbFinal
));
}
LLPointer
<
LLInventoryCallback
>
cb
=
new
LLBoostFuncInventoryCallback
(
boost
::
bind
(
RlvGiveToRLVOffer
::
moveAndRename
,
_1
,
idDestination
,
strName
,
cbFinal
));
rename_category
(
&
gInventory
,
idFolder
,
strName
,
cb
);
return
;
}
if
(
needsRename
)
if
(
cbFinal
)
{
rename_category
(
&
gInventory
,
idFolder
,
strName
,
(
cbMove
)
?
cbMove
:
cbFinal
);
cbFinal
.
get
()
->
fire
(
idFolder
);
}
}
else
if
(
cbFinal
)
...
...
@@ -650,8 +632,7 @@ void RlvGiveToRLVTaskOffer::doneIdle()
void
RlvGiveToRLVTaskOffer
::
onDestinationCreated
(
const
LLUUID
&
idDestFolder
,
const
std
::
string
&
strName
)
{
const
LLViewerInventoryCategory
*
pTarget
=
(
idDestFolder
.
notNull
())
?
gInventory
.
getCategory
(
idDestFolder
)
:
nullptr
;
if
(
pTarget
)
if
(
const
LLViewerInventoryCategory
*
pTarget
=
(
idDestFolder
.
notNull
())
?
gInventory
.
getCategory
(
idDestFolder
)
:
nullptr
)
{
moveAndRename
(
m_Folders
.
front
(),
idDestFolder
,
strName
,
new
LLBoostFuncInventoryCallback
(
boost
::
bind
(
&
RlvGiveToRLVTaskOffer
::
onOfferCompleted
,
this
,
_1
)));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment